Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    echo $x-- != ++$x;

    ?>

  2. A.

     1

    B.

     0

    C.

     error

    D.

     no output

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    Automatically x is declared and initialized to 0,then decremented and compared with its increments, thus returns 1.


Be The First To Comment