Download src/php/php-src/Zend/tests/clone/clone_004.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 334 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/clone/clone_004.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/clone/clone_004.phpt
-
curl -L -o clone_004.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/clone/clone_004.phpt
334 Bytes
| --TEST-- | |
| Testing usage of object as array on clone statement | |
| --FILE-- | |
| class foo { | |
| public function __get($a) { | |
| return new $this; | |
| } | |
| } | |
| $c = new foo; | |
| $a = clone $c->b[1]; | |
| --EXPECTF-- | |
| Fatal error: Uncaught Error: Cannot use object of type foo as array in %s:%d | |
| Stack trace: | |
| #0 {main} | |
| thrown in %s on line %d | |