summaryrefslogtreecommitdiff
path: root/Zend/tests/jump15.phpt
blob: 456d27785de1917655c49b74ecf9da7375b7d3bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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