1--TEST--
2Try catch finally (break / cont in try block)
3--CREDITS--
4adoy
5--FILE--
6<?php
7for ($i = 0;  $i < 100 ; $i ++) {
8    try {
9        break;
10    } finally {
11        var_dump("break");
12    }
13}
14
15
16for ($i = 0;  $i < 2; $i ++) {
17    try {
18        continue;
19    } finally {
20        var_dump("continue1");
21    }
22}
23
24for ($i = 0;  $i < 3; $i ++) {
25    try {
26        try {
27            continue;
28        } finally {
29            var_dump("continue2");
30            if ($i == 1) {
31                throw new Exception("continue exception");
32            }
33        }
34    } catch (Exception $e) {
35       var_dump("cactched");
36    }  finally {
37       var_dump("finally");
38    }
39}
40
41?>
42--EXPECT--
43string(5) "break"
44string(9) "continue1"
45string(9) "continue1"
46string(9) "continue2"
47string(7) "finally"
48string(9) "continue2"
49string(8) "cactched"
50string(7) "finally"
51string(9) "continue2"
52string(7) "finally"
53