fix GH-207 - static variables in functions become invalid
bug #268 fix GH-207 - static variables in functions become invalid (sstok)

This PR was merged into the 0.4.x-dev branch.

Discussion
----------

fix GH-207 - static variables in functions become invalid

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #207
| License       | MIT

This fixes changing of static variables inside a function, it only happens under rare conditions but none the less its a bug. A minor breakage is that `static $var;` without a visibility is no longer fixed (but this was not tested in the old version, so I'm not sure if this is a problem).

Commits
-------

33b08c6 fix GH-207 - static variables in functions become invalid