Q. What will be the output?
Code:
$x = 5; echo ++$x;
β
Correct Answer: (B)
6
Explanation: Pre-increment increments first, then returns value.
$x = 5; echo ++$x;
Explanation: Pre-increment increments first, then returns value.