Vidyalelo
PHP · Q78

Operators And Expressions

Programming · PHP · question 78

Q78

What will be the output of the following PHP code ?

A.
012
Answer
B.
123
C.
111
D.
Error

Answer: Option A

Solution

Answer: Option A
Solution:
When static is used, each time the function is called, that variable will still have the information it contained from the last time the function was called.