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