"> What will be the output of the following PHP code ?<?phpfunction

Home » PHP » PHP Functions » Question
  1. What will be the output of the following PHP code ?
    <?php
    function constant()
    {
    define("MESSAGE", "Welcome to Interview Mania");
    echo MESSAGE;
    }
    ?>
    1. MESSAGE, Welcome to Interview Mania
    2. Error
    3. Welcome to Interview Mania
    4. Nothing
    5. None of these
Correct Option: B

By default constants are case sensitive. Hence an error will arise.



Your comments will be displayed only after manual approval.