xref: /PHP-7.0/Zend/tests/gc_015.phpt (revision e24fff2d)
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());
16echo "ok\n";
17?>
18--EXPECT--
19int(2)
20ok
21