Download src/php/php-src/Zend/tests/closures/closure_021.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 305 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/closures/closure_021.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/closures/closure_021.phpt
-
curl -L -o closure_021.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/closures/closure_021.phpt
305 Bytes
| --TEST-- | |
| Closure 021: Throwing exception inside lambda | |
| --FILE-- | |
| $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!" | |