"> What will be the output of the following PHP code ?<?phpdefine("ATTENTION",

Home » PHP » PHP Constants » Question
  1. What will be the output of the following PHP code ?
    <?php
    define("ATTENTION", "Interview mania is good website.", true);
    echo $ATTENTION;
    ?>
    1. Interview mania is good website.
    2. Error
    3. $ATTENTION
    4. ATTENTION
    5. None of these
Correct Option: B

Constants do not need a $ before them, they are referenced by their variable names itself.



Your comments will be displayed only after manual approval.