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

Discussion :: PHP - CS

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

    <?php

    $x = 0;

    if ($x++)

    print "hi";

    else

    print "how are u";

    ?>

  2. A.

     hi

    B.

     no output

    C.

     error

    D.

     how are u

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    x is incremented after if which evaluates to false.


Be The First To Comment