Download src/php/php-src/Zend/tests/anon/007.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 362 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/anon/007.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/anon/007.phpt
-
curl -L -o 007.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/anon/007.phpt
362 Bytes
| --TEST-- | |
| testing anon classes in functions outside of classes in namespaces | |
| --FILE-- | |
| namespace lone { | |
| function my_factory() { | |
| return new class{}; | |
| } | |
| class Outer { | |
| public function __construct() { | |
| var_dump( | |
| my_factory()); | |
| } | |
| } | |
| new Outer(); | |
| } | |
| --EXPECTF-- | |
| object(class@%s)#2 (0) { | |
| } | |