3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function a(integer $a) : int { return $a; } echo a(7);
based on Er9uh
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/E4OHr on line 7 and defined in /in/E4OHr:3 Stack trace: #0 /in/E4OHr(7): a(7) #1 {main} thrown in /in/E4OHr on line 3
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Parse error: syntax error, unexpected ':', expecting '{' in /in/E4OHr on line 3
Process exited with code 255.