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

Discussion :: PHP - CS

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

    <?php

    $x;

    if ($x)

    print "hi" ;

    else

    print "how are u";

    ?>

  2. A.

     how are u

    B.

     hi

    C.

     error

    D.

     no output

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    Uninitialized x is set to 0, thus if condition fails.


Be The First To Comment