php-src/Zend/tests/closure_021.phpt

23 lines
278 B
Plaintext
Raw Normal View History

2008-07-14 21:36:40 +08:00
--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!"