xref: /php-src/Zend/tests/try/try_finally_024.phpt (revision 2ae21abd)
1--TEST--
2Exception in finally inside finally following try/catch containing throwing try/finally
3--FILE--
4<?php
5
6function test() {
7    try {
8        throw new Exception(1);
9    } finally {
10        try {
11            try {
12            } finally {
13                throw new Exception(2);
14            }
15        } catch (Exception $e) {}
16        try {
17        } finally {
18            throw new Exception(3);
19        }
20    }
21}
22
23try {
24    test();
25} catch (Exception $e) {
26    echo $e, "\n";
27}
28?>
29--EXPECTF--
30Exception: 1 in %s:%d
31Stack trace:
32#0 %s(%d): test()
33#1 {main}
34
35Next Exception: 3 in %s:%d
36Stack trace:
37#0 %s(%d): test()
38#1 {main}
39