-
What will be the output of the following PHP code ?
<?php
$p = 25;
$q = 26;
if ($p < ++$p || $q < ++$q)
print "if statement executed...";
else
print "else statement executed...";
?>
-
- else statement executed...
- Error
- if statement executed...
- Nothing
- None of these
Correct Option: A
The operator precedence of ++ is higher than <,thus the increment happens first and then compared.