Download src/php/php-src/Zend/tests/arg_unpack/dynamic.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/arg_unpack/dynamic.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/arg_unpack/dynamic.phpt
-
curl -L -o dynamic.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/arg_unpack/dynamic.phpt
369 Bytes
| --TEST-- | |
| Unpack arguments for dynamic call | |
| --FILE-- | |
| $fn = function(...$args) { | |
| var_dump($args); | |
| }; | |
| $fn(...[]); | |
| $fn(...[1, 2, 3]); | |
| $fn(1, ...[2, 3], ...[], ...[4, 5]); | |
| --EXPECT-- | |
| array(0) { | |
| } | |
| array(3) { | |
| [0]=> | |
| int(1) | |
| [1]=> | |
| int(2) | |
| [2]=> | |
| int(3) | |
| } | |
| array(5) { | |
| [0]=> | |
| int(1) | |
| [1]=> | |
| int(2) | |
| [2]=> | |
| int(3) | |
| [3]=> | |
| int(4) | |
| [4]=> | |
| int(5) | |
| } | |