mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
31 lines
380 B
Plaintext
31 lines
380 B
Plaintext
|
--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
|