summaryrefslogtreecommitdiff
path: root/Zend/tests/goto_in_foreach.phpt
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2015-07-10 13:30:25 +0200
committerDmitry Stogov <dmitry@zend.com>2015-08-04 07:42:28 +0300
commit743801054d83285e19f26a1d00dc81e4f7caeefa (patch)
tree9687bd4a8d79cf5b61115b4822b602715e344b26 /Zend/tests/goto_in_foreach.phpt
parente39c525df8de10d69a40177964128dc07ee94c5b (diff)
downloadphp-git-743801054d83285e19f26a1d00dc81e4f7caeefa.tar.gz
Try to fix finally issue
Diffstat (limited to 'Zend/tests/goto_in_foreach.phpt')
-rw-r--r--Zend/tests/goto_in_foreach.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Zend/tests/goto_in_foreach.phpt b/Zend/tests/goto_in_foreach.phpt
new file mode 100644
index 0000000000..e618772ba6
--- /dev/null
+++ b/Zend/tests/goto_in_foreach.phpt
@@ -0,0 +1,16 @@
+--TEST--
+goto inside foreach
+--FILE--
+<?php
+
+foreach ([0] as $x) {
+ goto a;
+a:
+ echo "loop\n";
+}
+
+echo "done\n";
+?>
+--EXPECT--
+loop
+done