php-src/Zend/tests/catch_finally_002.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
266 B
PHP

--TEST--
Try catch finally (basic test with return)
--FILE--
<?php
function foo () {
try {
echo "try\n";
return 1;
} catch (Exception $e) {
} finally {
echo "finally\n";
}
return 2;
}
var_dump(foo());
?>
--EXPECTF--
try
finally
int(1)