Download src/php/php-src/Zend/tests/generators/bug66041.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 330 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/generators/bug66041.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/generators/bug66041.phpt
-
curl -L -o bug66041.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/generators/bug66041.phpt
330 Bytes
| --TEST-- | |
| Bug #66041: list() fails to unpack yielded ArrayAccess object | |
| --FILE-- | |
| function dumpElement() { | |
| list($value) = yield; | |
| var_dump($value); | |
| }; | |
| $fixedArray = new SplFixedArray(1); | |
| $fixedArray[0] = 'the element'; | |
| $generator = dumpElement(); | |
| $generator->send($fixedArray); | |
| --EXPECT-- | |
| string(11) "the element" | |