1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/Zend/tests/constexpr/new_static.phpt
2023-05-24 20:17:31 +02:00

23 lines
292 B
PHP

--TEST--
Static in new is not 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) {
}