Q57
What will be the output of the following PHP code ? ++ i) - 1) print i; ?>
A.
00000000000000000000….infinitely
AnswerB.
-1-1-1-1-1-1-1-1-1-1…infinitely
C.
no output
D.
error
Answer: Option A
Solution
Answer: Option A
Solution:
(–i) evaluates to 0 but -1 makes it enters the loop and prints i.