3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); function xyz(int $user, string $name): string { return $user . " " . $name; } echo xyz(name => "Alex", user => 1);
based on mID4V
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.3.20 - 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.