php-src/Zend/tests/gc_015.phpt
Nikita Popov 153b27dff1 Fix GC tests on dbg-zts-nocache
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.
2016-04-28 20:10:28 +02:00

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