php-src/Zend/tests/bug78335.phpt
Nikita Popov ec9a96dc60 Fixed bug #78335
Destroy static properties and variables prior to the final GC run,
as they may hold GC roots.
2019-08-28 12:32:06 +02:00

29 lines
384 B
PHP

--TEST--
Bug #78335: Static properties/variables containing cycles report as leak
--FILE--
<?php
class Test {
public static $test;
public static function method() {
static $foo;
$foo = [&$foo];
}
}
function test() {
static $foo;
$foo = [&$foo];
}
$foo = [&$foo];
Test::$test = $foo;
test();
Test::method();
?>
===DONE===
--EXPECT--
===DONE===