PHP Static Variables - Phptpoint

PHP Static Variables

/ins>

Static Variable

When a function is completed, all of its variables are normally deleted.

Output
0 0 0

However, sometimes you want a local variable to not be deleted then use static keyword.

Output
0 1 2