php-src/Zend/tests/catch_finally_005.phpt
Xinchen Hui 60a29791e4 Fixed bug that jmp in try block jmp over finally block
Refactor the implemention,  make codes clear
2012-08-22 18:32:03 +08:00

22 lines
327 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"));
?>
--EXPECTF--
int(3)