summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/preload_method_static_vars.inc
blob: 03d3c6cb6f646ea15c98fcd8e7ed663a186b10b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
class Foo {
    public static function test() {
        static $i = 0;
        var_dump(++$i);
    }
}


Foo::test();
eval("class Bar extends Foo {}"); // Avoid early binding.
Foo::test();
Bar::test();
Bar::test();
echo "\n";