1--TEST--
2Try catch finally
3--FILE--
4<?php
5
6class AE extends Exception {};
7class BE extends Exception {};
8
9function foo () {
10    try {
11        try {
12            try {
13                throw new Exception("try");
14            } catch (AE $e) {
15                echo "0";
16                die("error");
17            } finally {
18                echo "1";
19            }
20        } finally {
21            echo "2";
22        }
23    } catch (BE $e) {
24      die("error");
25    } catch (Exception $e) {
26        echo "3";
27    } finally {
28        echo "4";
29    }
30   return 1;
31}
32
33var_dump(foo());
34?>
35--EXPECT--
361234int(1)
37