xref: /PHP-8.2/Zend/tests/gc_012.phpt (revision 7aacc705)
1--TEST--
2GC 012: collection of many loops at once
3--INI--
4zend.enable_gc=1
5--FILE--
6<?php
7$a=array();
8for ($i=0; $i < 1000; $i++) {
9    $a[$i] = array(array());
10    $a[$i][0] = & $a[$i];
11}
12var_dump(gc_collect_cycles());
13unset($a);
14var_dump(gc_collect_cycles());
15echo "ok\n";
16?>
17--EXPECT--
18int(0)
19int(1000)
20ok
21