1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/Zend/tests/try/try_catch_finally_002.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

43 lines
791 B
PHP

--TEST--
Try catch finally catch(multi catch blocks)
--FILE--
<?php
class AE extends Exception {};
class BE extends Exception {};
function foo () {
try {
try {
try {
try {
echo "1";
throw new Exception("try");
} catch (AE $e) {
die("error");
} finally {
echo "2";
}
} finally {
echo "3";
}
} catch (BE $e) {
die("error");
} finally {
echo "4";
}
} catch (Exception $e) {
echo "5";
} catch (AE $e) {
die("error");
} finally {
echo "6";
}
return 7;
}
var_dump(foo());
?>
--EXPECT--
123456int(7)