1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 01:48:26 +02:00
Files
archived-php-src/Zend/tests/try/catch_finally_001.phpt
T
2015-07-10 13:35:14 +02:00

33 lines
373 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);
?>
--EXPECTF--
try
finally
end
try
catch
finally
end