mirror of
https://github.com/php/php-src.git
synced 2024-11-26 03:16:33 +08:00
23 lines
278 B
Plaintext
23 lines
278 B
Plaintext
|
--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!"
|