Download src/php/php-src/Zend/tests/foreach/bug39825.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 231 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/foreach/bug39825.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/foreach/bug39825.phpt
-
curl -L -o bug39825.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/foreach/bug39825.phpt
231 Bytes
| --TEST-- | |
| Bug #39825 (foreach produces memory error) | |
| --FILE-- | |
| $array = array(1 => 2, "foo" => "bar"); | |
| $obj = (object)$array; | |
| foreach ($obj as $name => $value) { | |
| echo "$name -> $value\n"; | |
| } | |
| --EXPECT-- | |
| 1 -> 2 | |
| foo -> bar | |