php-src/Zend/tests/temporary_cleaning_012.phpt
Nikita Popov 502dd99a6c Fix ZEND_NEW live ranges
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.
2016-02-13 19:04:54 +01:00

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