xref: /PHP-5.3/Zend/tests/gc_006.phpt (revision a140e706)
1--TEST--
2GC 006: Simple array-object cycle
3--INI--
4zend.enable_gc=1
5--FILE--
6<?php
7$a = new stdClass();
8$a->a = array();
9$a->a[0] =& $a;
10var_dump($a);
11unset($a);
12var_dump(gc_collect_cycles());
13echo "ok\n"
14?>
15--EXPECTF--
16object(stdClass)#%d (1) {
17  ["a"]=>
18  array(1) {
19    [0]=>
20    *RECURSION*
21  }
22}
23int(2)
24ok
25