?
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
A
The inner most bracket is evaluated first, since it covers only variable y it is as good as not using brackets.
Join the Discussion
Login to post a comment or share your explanation.
Login