3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function helloWorld(string $username) : string { return "Hello world {$username}"; } echo helloWorld('Thomas');
based on QB8ur
Output for 7.0.0 - 7.2.0
Hello world Thomas
Output for 5.3.22 - 5.6.21
Parse error: syntax error, unexpected ':', expecting '{' in /in/d37ON on line 2
Process exited with code 255.