Download src/php/php-src/Zend/tests/generators/bug75396.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 279 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/generators/bug75396.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/generators/bug75396.phpt
-
curl -L -o bug75396.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/generators/bug75396.phpt
279 Bytes
| --TEST-- | |
| Bug #75396: Exit inside generator finally results in fatal error | |
| --FILE-- | |
| $gen = (function () { | |
| yield 42; | |
| try { | |
| echo "Try\n"; | |
| exit("Exit\n"); | |
| } finally { | |
| echo "Finally\n"; | |
| } | |
| })(); | |
| $gen->send("x"); | |
| --EXPECT-- | |
| Try | |
| Exit | |