mirror of
https://github.com/php/php-src.git
synced 2024-12-20 15:30:38 +08:00
31 lines
380 B
PHP
31 lines
380 B
PHP
--TEST--
|
|
Try finally (function call in the finaly block after exception)
|
|
--FILE--
|
|
<?php
|
|
function foo() {
|
|
echo "4";
|
|
}
|
|
function bar() {
|
|
try {
|
|
echo "2";
|
|
throw new Exception();
|
|
echo "x";
|
|
} catch (MyEx $ex) {
|
|
echo "x";
|
|
} finally {
|
|
echo "3";
|
|
foo();
|
|
echo "5";
|
|
}
|
|
}
|
|
try {
|
|
echo "1";
|
|
bar();
|
|
echo "x";
|
|
} catch (Exception $ex) {
|
|
echo "6";
|
|
}
|
|
echo "\n";
|
|
--EXPECT--
|
|
123456
|