xref: /PHP-8.2/Zend/tests/exit_finally_2.phpt (revision 75a04eac)
1--TEST--
2exit() and finally (2)
3--FILE--
4<?php
5
6// TODO: In the future, we should execute the finally block.
7
8try {
9    try {
10        exit("Exit\n");
11    } catch (Throwable $e) {
12        echo "Not caught\n";
13    } finally {
14        throw new Exception("Finally exception");
15    }
16    echo "Not executed\n";
17} catch (Exception $e) {
18    echo "Caught {$e->getMessage()}\n";
19}
20
21?>
22--EXPECT--
23Exit
24