mirror of
https://github.com/php/php-src.git
synced 2024-12-24 09:18:17 +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!"
|