mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
502dd99a6c
While the def starts at DO_FCALL, the variable should still be the result of NEW, not DO_FCALL. I had to fix the test for #68652, because the code started to (correctly) free the "new self()" object, which triggered an infinite destructor loop.
21 lines
325 B
PHP
21 lines
325 B
PHP
--TEST--
|
|
Live range of ZEND_NEW must be assigned to correct variable
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
public static function test() {
|
|
self::$property = new self;
|
|
}
|
|
}
|
|
|
|
try {
|
|
Foo::test();
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Access to undeclared static property: Foo::$property
|