php-src/Zend/tests/closure_021.phpt
2020-02-03 22:52:20 +01:00

23 lines
305 B
PHP

--TEST--
Closure 021: Throwing exception inside lambda
--FILE--
<?php
$foo = function() {
try {
throw new Exception('test!');
} catch(Exception $e) {
throw $e;
}
};
try {
$foo();
} catch (Exception $e) {
var_dump($e->getMessage());
}
?>
--EXPECT--
string(5) "test!"