Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
Zend /
tests /
arrow_functions /
Delete
Unzip
Name
Size
Permission
Date
Action
001.phpt
707
B
-rw-rw-r--
2022-10-31 11:36
002.phpt
210
B
-rw-rw-r--
2022-10-31 11:36
003.phpt
294
B
-rw-rw-r--
2022-10-31 11:36
004.phpt
200
B
-rw-rw-r--
2022-10-31 11:36
005.phpt
975
B
-rw-rw-r--
2022-10-31 11:36
006.phpt
825
B
-rw-rw-r--
2022-10-31 11:36
007.phpt
376
B
-rw-rw-r--
2022-10-31 11:36
008.phpt
407
B
-rw-rw-r--
2022-10-31 11:36
Save
Rename
--TEST-- Arrow functions syntax variations --FILE-- <?php // By-reference argument and return $var = 1; $id = fn&(&$x) => $x; $ref =& $id($var); $ref++; var_dump($var); // int argument and return type $var = 10; $int_fn = fn(int $x): int => $x; var_dump($int_fn($var)); try { $int_fn("foo"); } catch (TypeError $e) { echo $e->getMessage(), "\n"; } $varargs = fn(?int... $args): array => $args; var_dump($varargs(20, null, 30)); try { $varargs(40, "foo"); } catch (TypeError $e) { echo $e->getMessage(), "\n"; } ?> --EXPECTF-- int(2) int(10) Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d array(3) { [0]=> int(20) [1]=> NULL [2]=> int(30) } Argument 2 passed to {closure}() must be of the type int or null, string given, called in %s on line %d