blob: f92e6d3a5d3f6a8d2c3666879c28cf4509673c94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--TEST--
Initial value of static var in method depends on the include time of the class definition
--FILE--
<?php
class Foo {
public static function test() {
static $i = 0;
var_dump(++$i);
}
}
Foo::test();
eval("class Bar extends Foo {}");
Foo::test();
Bar::test();
Bar::test();
?>
--EXPECT--
int(1)
int(2)
int(1)
int(2)
|