mirror of
https://github.com/php/php-src.git
synced 2026-04-26 17:38:14 +02:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
33 lines
372 B
PHP
33 lines
372 B
PHP
--TEST--
|
|
Try catch finally (basic test)
|
|
--FILE--
|
|
<?php
|
|
function foo ($throw = FALSE) {
|
|
try {
|
|
echo "try\n";
|
|
if ($throw) {
|
|
throw new Exception("ex");
|
|
}
|
|
} catch (Exception $e) {
|
|
echo "catch\n";
|
|
} finally {
|
|
echo "finally\n";
|
|
}
|
|
|
|
echo "end\n";
|
|
}
|
|
|
|
foo();
|
|
echo "\n";
|
|
foo(true);
|
|
?>
|
|
--EXPECT--
|
|
try
|
|
finally
|
|
end
|
|
|
|
try
|
|
catch
|
|
finally
|
|
end
|