Vidyalelo
PHP · Q18

Basic PHP

Programming · PHP · question 18

Q18

What will be the output of the following code?

A.
123
Answer
B.
111
C.
000
D.
011

Answer: Option A

Solution

Answer: Option A
Solution:
Because $count is static, it retains its previous value each time the function is executed.