php-src/Zend/tests/gc_014.phpt

21 lines
283 B
Plaintext
Raw Normal View History

2008-01-22 09:27:48 +00:00
--TEST--
2008-04-09 23:35:19 +00:00
GC 014: Too many cycles in one object
2010-03-03 17:53:15 +00:00
--INI--
zend.enable_gc=1
2008-01-22 09:27:48 +00:00
--FILE--
<?php
$a = new stdClass();
for ($i = 0; $i < 10001; $i++) {
$b =& $a;
$a->{"a".$i} = $a;
}
unset($b);
$a->b = "xxx";
unset($a);
var_dump(gc_collect_cycles());
echo "ok\n";
?>
--EXPECT--
int(10002)
ok