3v4l.org

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