"> What will be the output of the following PHP code ?<?phpdefine("STR_VAR","Interview");

Home » PHP » PHP Constants » Question
  1. What will be the output of the following PHP code ?
    <?php
    define("STR_VAR","Interview");
    ${STR_VAR} = "Mania";
    echo STR_VAR;
    echo ${STR_VAR};
    ?>
    1. Interview
    2. InterveiwMania
    3. Error
    4. Mania
    5. None of these
Correct Option: B

${STR_VAR} creates a new variable which is not same as STR_VAR.



Your comments will be displayed only after manual approval.