summaryrefslogtreecommitdiff
path: root/Zend/tests/gc_007.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/gc_007.phpt')
-rw-r--r--Zend/tests/gc_007.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/Zend/tests/gc_007.phpt b/Zend/tests/gc_007.phpt
new file mode 100644
index 0000000000..4baa5e666f
--- /dev/null
+++ b/Zend/tests/gc_007.phpt
@@ -0,0 +1,26 @@
+--TEST--
+GC 007: Unreferensed array cycle
+--FILE--
+<?php
+$a = array(array());
+$a[0][0] =& $a[0];
+var_dump($a[0]);
+var_dump(gc_collect_cycles());
+unset($a);
+var_dump(gc_collect_cycles());
+echo "ok\n"
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ &array(1) {
+ [0]=>
+ *RECURSION*
+ }
+ }
+}
+int(0)
+int(1)
+ok