1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
--TEST-- GC 013: Too many cycles in one array --INI-- zend.enable_gc=1 --FILE-- <?php $a = array(); for ($i = 0; $i < 10001; $i++) { $a[$i] =& $a; } $a[] = "xxx"; unset($a); var_dump(gc_collect_cycles() > 0); echo "ok\n"; ?> --EXPECT-- bool(true) ok