xref: /PHP-8.0/Zend/tests/gc_007.phpt (revision ae6f45ad)
1--TEST--
2GC 007: Unreferenced array cycle
3--INI--
4zend.enable_gc=1
5--FILE--
6<?php
7$a = array(array());
8$a[0][0] =& $a[0];
9var_dump($a[0]);
10var_dump(gc_collect_cycles());
11unset($a);
12var_dump(gc_collect_cycles());
13echo "ok\n"
14?>
15--EXPECT--
16array(1) {
17  [0]=>
18  *RECURSION*
19}
20int(0)
21int(1)
22ok
23