1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 08:28:26 +02:00
Files
archived-php-src/Zend/tests/arrow_functions/007.phpt
T
2020-08-02 13:39:35 -06:00

18 lines
421 B
PHP

--TEST--
Pretty printing for arrow functions
--INI--
zend.assertions=1
assert.exception=0
--FILE--
<?php
// TODO We're missing parentheses for the direct call
assert((fn() => false)());
assert((fn&(int... $args): ?bool => $args[0])(false));
?>
--EXPECTF--
Warning: assert(): assert(fn() => false()) failed in %s on line %d
Warning: assert(): assert(fn&(int ...$args): ?bool => $args[0](false)) failed in %s on line %d