Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $a = 10; $b = 10;

    if ($a = 5)

    $b--;

    print $a;print $b--;

    ?>

  2. A.

     58

    B.

     59

    C.

     109

    D.

     108

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    a is set to 5 in the if condition and b is postdecremented in the print statement.


Be The First To Comment