?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$x = 10;
$y = 4;
$z = 3;
echo $x % $y % $z;
?>
<?php
$x = 10;
$y = 4;
$z = 3;
echo $x % $y % $z;
?>
Answer & Solution
Correct Answer:
Option
C
The expression is considered as ($x%$y)%z in this case (10%4)%3 which is 2.
Join the Discussion
Login to post a comment or share your explanation.
Login