mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
31 lines
483 B
PHP
31 lines
483 B
PHP
--TEST--
|
|
Try catch finally (re-throw exception in catch block)
|
|
--CREDITS--
|
|
adoy
|
|
--FILE--
|
|
<?php
|
|
function dummy($msg) {
|
|
var_dump($msg);
|
|
}
|
|
try {
|
|
try {
|
|
var_dump("try");
|
|
return;
|
|
} catch (Exception $e) {
|
|
dummy("catch");
|
|
throw $e;
|
|
} finally {
|
|
dummy("finally");
|
|
}
|
|
} catch (Exception $e) {
|
|
dummy("catch2");
|
|
} finally {
|
|
dummy("finally2");
|
|
}
|
|
var_dump("end");
|
|
?>
|
|
--EXPECTF--
|
|
string(3) "try"
|
|
string(7) "finally"
|
|
string(8) "finally2"
|