Download src/php/php-src/sapi/phpdbg/tests/generator_run.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 339 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/phpdbg/tests/generator_run.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/sapi/phpdbg/tests/generator_run.phpt
-
curl -L -o generator_run.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/phpdbg/tests/generator_run.phpt
339 Bytes
| --TEST-- | |
| Ensure proper saving of EX(opline) | |
| --PHPDBG-- | |
| r | |
| q | |
| --EXPECTF-- | |
| [Successful compilation of %s] | |
| prompt> caught Generator exception | |
| [Script ended normally] | |
| prompt> | |
| --FILE-- | |
| function gen() { | |
| try { | |
| throw new Exception; | |
| } catch(Exception $e) { | |
| yield "caught Generator exception"; | |
| } | |
| } | |
| foreach (gen() as $v) { | |
| print $v; | |
| } | |