1
0
mirror of https://github.com/php/php-src.git synced 2026-04-16 20:41:18 +02:00
Files
archived-php-src/Zend/tests/try/try_catch_finally_004.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

31 lines
482 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");
?>
--EXPECT--
string(3) "try"
string(7) "finally"
string(8) "finally2"