summaryrefslogtreecommitdiff
path: root/Zend/tests/jump15.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/jump15.phpt')
-rw-r--r--Zend/tests/jump15.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/Zend/tests/jump15.phpt b/Zend/tests/jump15.phpt
new file mode 100644
index 0000000000..456d27785d
--- /dev/null
+++ b/Zend/tests/jump15.phpt
@@ -0,0 +1,29 @@
+--TEST--
+jump 15: goto from loop (forward)
+--FILE--
+<?php
+$ar = array("1","2","3");
+foreach ($ar as $val) {
+ switch ($val) {
+ case "1":
+ echo "1: ok\n";
+ break;
+ case "2":
+ echo "2: ok\n";
+ goto L1;
+ case "3":
+ echo "bug\n";
+ break;
+ }
+}
+echo "bug\n";
+L1:
+try {
+ echo "3: ok\n";
+} finally {
+}
+?>
+--EXPECT--
+1: ok
+2: ok
+3: ok