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

Discussion :: PHP - CS

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

    <?php

    function constant()

    {

    define("GREETING", "Welcome to Narnia",true);

    echo greeting;

    }

    ?>

  2. A.

     Welcome to Narnia

    B.

     greeting

    C.

     GREETING

    D.

     ERROR

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    By default constants are case sensitive. But the third parameter in define(), if set to true, makes constants case insensitive.


Be The First To Comment