3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function a(integer $a) : integer { echo $a; } a(7);
based on k0MYv
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to a() must be an instance of integer, integer given, called in /in/q0N6a on line 7 and defined in /in/q0N6a:3 Stack trace: #0 /in/q0N6a(7): a(7) #1 {main} thrown in /in/q0N6a on line 3
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Parse error: syntax error, unexpected ':', expecting '{' in /in/q0N6a on line 3
Process exited with code 255.