xref: /PHP-8.0/Zend/tests/gc_015.phpt (revision 153b27df)
1--TEST--
2GC 015: Object as root of cycle
3--INI--
4zend.enable_gc=1
5--FILE--
6<?php
7$a = new stdClass();
8$c =& $a;
9$b = $a;
10$a->a = $a;
11$a->b = "xxx";
12unset($c);
13unset($a);
14unset($b);
15var_dump(gc_collect_cycles() > 0);
16echo "ok\n";
17?>
18--EXPECT--
19bool(true)
20ok
21