Home » PHP » PHP Variables » Question
  1. What will be the output of the following PHP code ?
    <?php
    $p = 22;
    $q = 5;
    $r = 4;
    echo $p % $q % $r;
    ?>
    1. 22
    2. 5
    3. 4
    4. 2
    5. None of these
Correct Option: D

The expression is considered as ($p%$q)%r in this case (22%5)%4 which is 2.



Your comments will be displayed only after manual approval.