function foo() {static $a; $a++; echo "$a\n"; unset($a);} foo(); foo(); foo();
If a static variable is unset() inside of a function, unset() unsets the reference to the static variable, rather than the static variable itself.