mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
ec9a96dc60
Destroy static properties and variables prior to the final GC run, as they may hold GC roots.
29 lines
384 B
PHP
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===
|