mirror of
https://github.com/php/php-src.git
synced 2024-12-15 12:54:57 +08:00
23 lines
305 B
PHP
23 lines
305 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!"
|