Download src/php/php-src/Zend/tests/generators/bug75786.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 303 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/generators/bug75786.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/generators/bug75786.phpt
-
curl -L -o bug75786.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/generators/bug75786.phpt
303 Bytes
| --TEST-- | |
| Bug #75786: segfault when using spread operator on generator passed by reference | |
| --FILE-- | |
| function &gen($items) { | |
| foreach ($items as $key => &$value) { | |
| yield $key => $value; | |
| } | |
| } | |
| var_dump(...gen(['a', 'b', 'c'])); | |
| --EXPECT-- | |
| string(1) "a" | |
| string(1) "b" | |
| string(1) "c" | |