Download src/php/php-src/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 353 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt
-
curl -L -o ReflectionClass_CannotClone_basic.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt
353 Bytes
| --TEST-- | |
| Reflection class cannot be cloned | |
| --CREDITS-- | |
| Stefan Koopmanschap <stefan@phpgg.nl> | |
| TestFest PHP|Tek | |
| --FILE-- | |
| $rc = new ReflectionClass("stdClass"); | |
| try { | |
| $rc2 = clone($rc); | |
| } catch (Throwable $e) { | |
| echo $e::class, ": ", $e->getMessage(), PHP_EOL; | |
| } | |
| --EXPECT-- | |
| Error: Trying to clone an uncloneable object of class ReflectionClass | |