Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

  1. What will be the output of the following PHP code ?

    <?php

    define("NEW_GOOD_NAME_CONSTANT", "I have a value");

    define("OLD_BAD_NAME_CONSTANT", NEW_GOOD_NAME_CONSTANT);

    echo NEW_GOOD_NAME_CONSTANT;

    echo OLD_BAD_NAME_CONSTANT;

    ?>

  2. A.

     I have a value

    B.

     I have a valueI have a value

    C.

     ERROR

    D.

     I have a valueNEW_GOO_NAME_CONSTANTS

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Constants can be set as values for other constants.


Be The First To Comment