diff options
Diffstat (limited to 'Zend/tests/gc_014.phpt')
-rw-r--r-- | Zend/tests/gc_014.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/gc_014.phpt b/Zend/tests/gc_014.phpt new file mode 100644 index 0000000000..a9d30f1592 --- /dev/null +++ b/Zend/tests/gc_014.phpt @@ -0,0 +1,18 @@ +--TEST-- +GC 014: Too many cycles in one object +--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 |