3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function xyz(int $user, string $name): string { return $user . " " . $name; } echo xyz(name => "Alex", user => 1);
Output for 7.0.0
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' in /in/LPKeu on line 7
Process exited with code 255.
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Warning: Unsupported declare 'strict_types' in /in/LPKeu on line 2 Parse error: syntax error, unexpected ':', expecting '{' in /in/LPKeu on line 3
Process exited with code 255.

preferences:
153.85 ms | 1399 KiB | 24 Q