Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $x = 10;

    $y = 4;

    $z = 3;

    echo ($x % ($y) + $z);

    ?>

  2. A.

     5

    B.

     3

    C.

     0

    D.

     1

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    The inner most bracket is evaluated first, since it covers only variable y it is as good as not using brackets.


Be The First To Comment