File size: 288 Bytes
1e94262 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | --TEST--
Static in new is supported
--FILE--
<?php
class Foo {
public static function singleton() {
static $x = new static;
return $x;
}
}
$x = Foo::singleton();
$y = Foo::singleton();
var_dump($x, $y);
?>
--EXPECT--
object(Foo)#1 (0) {
}
object(Foo)#1 (0) {
}
|