3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define('strict_types', 1); function hello(string $s) : int { echo "$s\n"; return 42; } $i = hello(1234); echo $i;
Output for hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.2.9
1234 42
Output for 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/ifIU7 on line 4
Process exited with code 255.