Download src/php/php-src/Zend/tests/declare/declare_007.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 359 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/declare/declare_007.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/declare/declare_007.phpt
-
curl -L -o declare_007.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/declare/declare_007.phpt
359 Bytes
| --TEST-- | |
| Testing declare statement with ticks with callback arguments | |
| --FILE-- | |
| register_tick_function(function (stdClass $object, array $array) { | |
| echo "tick: ", get_class($object), " ", count($array), "\n"; | |
| }, new \stdClass(), [1, 2, 3]); | |
| function foo() { } | |
| declare(ticks=1) { | |
| $statement; | |
| foo(); | |
| } | |
| --EXPECT-- | |
| tick: stdClass 3 | |
| tick: stdClass 3 | |