Home » PHP » PHP Functions » Question
  1. What will be the output of the following PHP code?
    <?php
    define("GREETING1","Welcome to interview mania!");
    define("GREETING2","Welcome to interview mania!");
    define("GREETING3","Welcome to interview mania!");
    echo defined("GREETING");
    ?>
    1. "GREETING Welcome to interview mania! " 3 times
    2. Error
    3. "Welcome to interview mania!" 3 times
    4. Nothing
    5. None of these
Correct Option: D

The defined() function checks whether a constant exists.



Your comments will be displayed only after manual approval.