@ 2018-09-29T16:06:01Z <?php
foreach (range(1, 10) as $i) {
switch ($i) {
case 1;
echo 'first' . PHP_EOL;
break;
case 2:
echo 'second' . PHP_EOL;
continue;
break;
}
echo $i . PHP_EOL;
}
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.33 , 8.2.0 - 8.2.29 , 8.3.0 - 8.3.23 , 8.4.1 - 8.4.10 Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /in/la8dg on line 11
first
1
second
2
3
4
5
6
7
8
9
10
Output for 5.6.0 - 5.6.40 , 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 first
1
second
2
3
4
5
6
7
8
9
10
preferences:dark mode live preview ace vim emacs key bindings
136.05 ms | 408 KiB | 5 Q