mirror of
https://github.com/php/php-src.git
synced 2024-12-05 07:46:06 +08:00
60a29791e4
Refactor the implemention, make codes clear
22 lines
266 B
PHP
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)
|