3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ini_set('display_errors', true); ini_set('error_reporting', E_ALL); function foo(int $a) { return ++$a; } echo foo(6);
based on vcMJk
Output for 7.0.0 - 7.2.0
7
Output for 5.3.20 - 5.6.28
Catchable fatal error: Argument 1 passed to foo() must be an instance of int, integer given, called in /in/Q7SVe on line 9 and defined in /in/Q7SVe on line 7
Process exited with code 255.