Download src/php/php-src/Zend/tests/closures/closure_013.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 377 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/closures/closure_013.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/closures/closure_013.phpt
-
curl -L -o closure_013.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/closures/closure_013.phpt
377 Bytes
| --TEST-- | |
| Closure 013: __invoke() on temporary result | |
| --FILE-- | |
| class Foo { | |
| function __invoke() { | |
| echo "Hello World!\n"; | |
| } | |
| } | |
| function foo() { | |
| return function() { | |
| echo "Hello World!\n"; | |
| }; | |
| } | |
| $test = new Foo; | |
| $test->__invoke(); | |
| $test = foo(); | |
| $test->__invoke(); | |
| $test = foo()->__invoke(); | |
| --EXPECT-- | |
| Hello World! | |
| Hello World! | |
| Hello World! | |