Download src/php/php-src/Zend/tests/clone/bug24884.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 424 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/clone/bug24884.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/clone/bug24884.phpt
-
curl -L -o bug24884.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/clone/bug24884.phpt
424 Bytes
| --TEST-- | |
| Bug #24884 (calling $this->__clone(); crashes php) | |
| --FILE-- | |
| class Test { | |
| function __copy() | |
| { | |
| $string = PHP_VERSION; | |
| $version = $string[0]; | |
| if($string < 5) | |
| { | |
| return $this; | |
| } | |
| else | |
| { | |
| return clone $this; | |
| } | |
| } | |
| } | |
| $test = new Test(); | |
| $test2 = $test->__copy(); | |
| var_dump($test2); | |
| --EXPECTF-- | |
| object(Test)#%d (0) { | |
| } | |