summaryrefslogtreecommitdiff
path: root/Zend/tests/bug67111.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/bug67111.phpt')
-rw-r--r--Zend/tests/bug67111.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/Zend/tests/bug67111.phpt b/Zend/tests/bug67111.phpt
new file mode 100644
index 0000000000..0fdfdfb517
--- /dev/null
+++ b/Zend/tests/bug67111.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #67111: Memory leak when using "continue 2" inside two foreach loops
+--FILE--
+<?php
+
+$array1 = [1, 2, 3];
+$array2 = [1, 2, 3];
+
+foreach ($array1 as $x) {
+ foreach ($array2 as $y) {
+ echo "$x.$y\n";
+ continue 2;
+ }
+}
+
+?>
+--EXPECT--
+1.1
+2.1
+3.1