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