Q. What will be the output of the following PHP code ?
Code:<?php
$p = 5;
$q = 6;
if (++$p == $q++)
{
echo "true ", $q, $p;
}
?>
β
Correct Answer: (D)
true 76
Explanation: p is preincremented and q is post incremented thus both are 6 in the if condition, later q is increment.