1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00
Files
archived-php-src/Zend/tests/try/catch_finally_005.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

22 lines
326 B
PHP

--TEST--
Try catch finally (with multi-returns and exception)
--FILE--
<?php
function foo ($a) {
try {
throw new Exception("ex");
} catch (PdoException $e) {
die("error");
} catch (Exception $e) {
return 2;
} finally {
return 3;
}
return 1;
}
var_dump(foo("para"));
?>
--EXPECT--
int(3)