Download src/php/php-src/Zend/tests/first_class_callable/gh18062.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/first_class_callable/gh18062.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/first_class_callable/gh18062.phpt
-
curl -L -o gh18062.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/first_class_callable/gh18062.phpt
491 Bytes
| --TEST-- | |
| First Class Callable returns correct name from is_callable() | |
| --FILE-- | |
| class Foo { | |
| public function __invoke() { | |
| } | |
| public static function bar() { | |
| } | |
| } | |
| function some_func() { | |
| } | |
| is_callable(some_func(...), callable_name: $name); | |
| var_dump($name); | |
| is_callable((new Foo())(...), callable_name: $name); | |
| var_dump($name); | |
| is_callable(Foo::bar(...), callable_name: $name); | |
| var_dump($name); | |
| --EXPECT-- | |
| string(9) "some_func" | |
| string(13) "Foo::__invoke" | |
| string(8) "Foo::bar" | |