Download src/php/php-src/Zend/tests/generators/bug74157.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 281 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/generators/bug74157.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/generators/bug74157.phpt
-
curl -L -o bug74157.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/generators/bug74157.phpt
281 Bytes
| --TEST-- | |
| Bug #74157 (Segfault with nested generators) | |
| --FILE-- | |
| function a() { | |
| $a = $b = $c = 2; | |
| foreach(range(1, 5) as $v) { | |
| yield $v; | |
| } | |
| return; | |
| } | |
| foreach (a(range(1, 3)) as $a) { | |
| var_dump($a); | |
| } | |
| --EXPECT-- | |
| int(1) | |
| int(2) | |
| int(3) | |
| int(4) | |
| int(5) | |