mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
23 lines
278 B
PHP
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!"
|