mirror of
https://github.com/php/php-src.git
synced 2024-12-15 04:45:03 +08:00
153b27dff1
We may collect a different number of zvals depending on interning. Switch tests to compare against a minimum number of collections instead of a fixed value.
21 lines
257 B
PHP
21 lines
257 B
PHP
--TEST--
|
|
GC 015: Object as root of cycle
|
|
--INI--
|
|
zend.enable_gc=1
|
|
--FILE--
|
|
<?php
|
|
$a = new stdClass();
|
|
$c =& $a;
|
|
$b = $a;
|
|
$a->a = $a;
|
|
$a->b = "xxx";
|
|
unset($c);
|
|
unset($a);
|
|
unset($b);
|
|
var_dump(gc_collect_cycles() > 0);
|
|
echo "ok\n";
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
ok
|