Download src/php/php-src/Zend/tests/foreach/bug39990.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 275 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/foreach/bug39990.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/foreach/bug39990.phpt
-
curl -L -o bug39990.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/foreach/bug39990.phpt
275 Bytes
| --TEST-- | |
| Bug #39990 (Cannot "foreach" over overloaded properties) | |
| --FILE-- | |
| class Foo { | |
| public function __get($name) { | |
| return array('Hello', 'World'); | |
| } | |
| } | |
| $obj=new Foo(); | |
| foreach($obj->arr as $value) | |
| echo "$value\n"; | |
| --EXPECT-- | |
| Hello | |
| World | |