php-src/Zend/tests/closure_021.phpt
2008-07-14 13:36:40 +00:00

23 lines
278 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!"