Download src/php/php-src/Zend/tests/arrow_functions/007.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 505 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/arrow_functions/007.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/arrow_functions/007.phpt
-
curl -L -o 007.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/arrow_functions/007.phpt
505 Bytes
| --TEST-- | |
| Pretty printing for arrow functions | |
| --INI-- | |
| zend.assertions=1 | |
| --FILE-- | |
| try { | |
| assert((fn() => false)()); | |
| } catch (AssertionError $e) { | |
| echo 'assert(): ', $e->getMessage(), ' failed', PHP_EOL; | |
| } | |
| try { | |
| assert((fn&(int... $args): ?bool => $args[0])(false)); | |
| } catch (AssertionError $e) { | |
| echo 'assert(): ', $e->getMessage(), ' failed', PHP_EOL; | |
| } | |
| --EXPECT-- | |
| assert(): assert((fn() => false)()) failed | |
| assert(): assert((fn&(int ...$args): ?bool => $args[0])(false)) failed | |