3v4l.org

run code in 200+ php & hhvm versions
<?php class Foo { public function bar() : int { return '1'; } } print (new Foo)->bar();
Output for 7.0.0 - 7.2.8
1
Output for 5.6.0 - 5.6.29
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/AHOW3 on line 5
Process exited with code 255.