dis-bench / src /php /php-src /Zend /tests /closures /closure_021.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
305 Bytes
--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!"