summaryrefslogtreecommitdiff
path: root/Zend/tests/gc_014.phpt
blob: 68fda48cc50daae8f36e12b7adb0627237f8636c (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() > 0);
echo "ok\n";
?>
--EXPECT--
bool(true)
ok