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