21
What will be the output of the following PHP code ?
<?php
$a = 5;$b = -7;$c =0;
$d = ++$a && ++$b || ++$c;
print $d;print $a;
?>
Answer & Solution
Answer: Option
A
Solution:
1&&0||1 is evaluated to 1 and the a is also pre incremented to 6.