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

Discussion :: PHP - CS

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

    <?php

    $x = 5;

    function fun()

    {

    echo "$x";

    }

    fun();

    ?>

  2. A.

     0

    B.

     5

    C.

     Nothing

    D.

     Error

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The variable x is not defined inside the function fun(), therefore nothing is printed on the screen.


Be The First To Comment