3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test (integer $var){ echo "Var is: ", $var; } test(42);
based on TtiHU
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of integer, integer given, called in /in/Pb6IV on line 5 and defined in /in/Pb6IV:2 Stack trace: #0 /in/Pb6IV(5): test(42) #1 {main} thrown in /in/Pb6IV on line 2
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Catchable fatal error: Argument 1 passed to test() must be an instance of integer, integer given, called in /in/Pb6IV on line 5 and defined in /in/Pb6IV on line 2
Process exited with code 255.