Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $var1 = 0;

    $var1 = ($var1 + 5)++;

    echo $var1;

    ?>

  2. A.

     5

    B.

     error

    C.

     6

    D.

     7

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Operator ++ can be done only on variables.


Be The First To Comment