Download src/php/php-src/Zend/tests/anon/002.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 304 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/anon/002.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/anon/002.phpt
-
curl -L -o 002.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/anon/002.phpt
304 Bytes
| --TEST-- | |
| declare anonymous class extending another | |
| --FILE-- | |
| class A{} | |
| interface B{ | |
| public function method(); | |
| } | |
| $a = new class extends A implements B { | |
| public function method(){ | |
| return true; | |
| } | |
| }; | |
| var_dump($a instanceof A, $a instanceof B); | |
| --EXPECT-- | |
| bool(true) | |
| bool(true) | |