Discussion :: PHP - CS
-
What will be the output of the following PHP code ?
<?php
$y = 2;
if (--$y <> ($y != $y++))
{
echo $y;
}
?>
Answer : Option B
Explanation :
–$y == 2 is false but y is decremented, the xor gives true if only one of the operands are true, thus 1 xor 0 is true.
Be The First To Comment