Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $var1 = 1;

    echo $var1 = ++$var1 % 2 + ++$var1;

    ?>

  2. A.

     1

    B.

     0

    C.

     2

    D.

     3

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    Evaluation done from right to left.


Be The First To Comment