3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function hash($key): string { return $key; } var_dump(hash(1));
Output for 7.0.0 - 7.1.6
Fatal error: Cannot redeclare hash() in /in/rqlUE on line 6
Process exited with code 255.
Output for hhvm-3.15.4
string(1) "1"
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/rqlUE on line 4
Process exited with code 255.