mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
60a29791e4
Refactor the implemention, make codes clear
24 lines
361 B
PHP
24 lines
361 B
PHP
--TEST--
|
|
Try finally (re-throw exception in finally block)
|
|
--FILE--
|
|
<?php
|
|
function foo () {
|
|
try {
|
|
throw new Exception("try");
|
|
} finally {
|
|
throw new Exception("finally");
|
|
}
|
|
}
|
|
|
|
try {
|
|
foo();
|
|
} catch (Exception $e) {
|
|
do {
|
|
var_dump($e->getMessage());
|
|
} while ($e = $e->getPrevious());
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(7) "finally"
|
|
string(3) "try"
|