Download src/php/php-src/Zend/tests/exit/exit_as_function.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 546 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exit/exit_as_function.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/exit/exit_as_function.phpt
-
curl -L -o exit_as_function.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exit/exit_as_function.phpt
546 Bytes
| --TEST-- | |
| exit() as function | |
| --FILE-- | |
| <?php | |
| function foo(callable $fn) { | |
| var_dump($fn); | |
| } | |
| $values = [ | |
| 'exit', | |
| 'die', | |
| exit(...), | |
| die(...), | |
| ]; | |
| foreach ($values as $value) { | |
| foo($value); | |
| } | |
| --EXPECT-- | |
| string(4) "exit" | |
| string(3) "die" | |
| object(Closure)#1 (2) { | |
| ["function"]=> | |
| string(4) "exit" | |
| ["parameter"]=> | |
| array(1) { | |
| ["$status"]=> | |
| string(10) "<optional>" | |
| } | |
| } | |
| object(Closure)#2 (2) { | |
| ["function"]=> | |
| string(4) "exit" | |
| ["parameter"]=> | |
| array(1) { | |
| ["$status"]=> | |
| string(10) "<optional>" | |
| } | |
| } | |