3v4l.org

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