3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function bar(int $foo): string { return $foo; } $result = bar(123); var_dump($result); // Output: string(3) "123"
Output for hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.3.0rc3
string(3) "123"
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/EGpLn on line 3
Process exited with code 255.