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

Home » PHP » PHP Constants » Question
  1. What will be the output of the following PHP code?
    <?php
    define('IF', 102);
    echo "IF: ", IF;
    ?>
    1. Error
    2. Nothing
    3. 102
    4. IF:102
    5. None of these
Correct Option: A

A keyword like IF cannot be used as constant names.



Your comments will be displayed only after manual approval.