summaryrefslogtreecommitdiff
path: root/Zend/tests/gc_012.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/gc_012.phpt')
-rw-r--r--Zend/tests/gc_012.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/gc_012.phpt b/Zend/tests/gc_012.phpt
new file mode 100644
index 0000000000..eff76ef31c
--- /dev/null
+++ b/Zend/tests/gc_012.phpt
@@ -0,0 +1,17 @@
+--TEST--
+GC 012: collection of many loops at once
+--FILE--
+<?php
+$a=array();
+for ($i=0; $i < 1000; $i++) {
+ $a[$i] = array(array());
+ $a[$i][0] = & $a[$i];
+}
+var_dump(gc_collect_cycles());
+unset($a);
+var_dump(gc_collect_cycles());
+echo "ok\n";
+--EXPECT--
+int(0)
+int(1000)
+ok