Download src/php/php-src/Zend/tests/clone/bug27268.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 363 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/clone/bug27268.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/clone/bug27268.phpt
-
curl -L -o bug27268.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/clone/bug27268.phpt
363 Bytes
| --TEST-- | |
| Bug #27268 (Bad references accentuated by clone) | |
| --FILE-- | |
| class A | |
| { | |
| public function &getA() | |
| { | |
| return $this->a; | |
| } | |
| } | |
| $A = new A; | |
| $A->a = array(1); | |
| $x = $A->getA(); | |
| $clone = clone $A; | |
| $clone->a = array(); | |
| print_r($A); | |
| --EXPECT-- | |
| A Object | |
| ( | |
| [a] => Array | |
| ( | |
| [0] => 1 | |
| ) | |
| ) | |