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