"/>
Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    define("VAR_NAME","test");

    ${VAR_NAME} = "value";

    echo VAR_NAME;

    echo ${VAR_NAME};

    ?>

  2. A.

     test

    B.

     testtest

    C.

     testvalue

    D.

     error, constant value cannot be changed

    View Answer

    Workspace

    Answer : Option C

    Explanation :

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


Be The First To Comment