ru_php/ext/opcache/tests/preload_method_static_vars.inc

16 lines
232 B
PHP
Raw Permalink Normal View History

<?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";