3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test(int $i) { echo $i; } test("test");
based on oXCFd
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to test() must be of the type integer, string given, called in /in/eHXkl on line 9 and defined in /in/eHXkl:3 Stack trace: #0 /in/eHXkl(9): test('test') #1 {main} thrown in /in/eHXkl on line 3
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 int, string given, called in /in/eHXkl on line 9 and defined in /in/eHXkl on line 3
Process exited with code 255.