Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $var = 10;

    function one()

    {

    echo $var;

    }

    one();

    ?>

  2. A.

     Error

    B.

     10

    C.

     No Output

    D.

     None of the Mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    $var is not global and hence is not available for one().


Be The First To Comment