1<?php
2class Foo {
3    public static function test() {
4        static $i = 0;
5        var_dump(++$i);
6    }
7}
8
9
10Foo::test();
11eval("class Bar extends Foo {}"); // Avoid early binding.
12Foo::test();
13Bar::test();
14Bar::test();
15echo "\n";
16