mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +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!"
|