3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { public function test2(string $test, int $test2) { print_r($test); print_r($test2); } } $test = new Test(); $test->test2('test', 1);
based on HldsG
Output for 7.0.0 - 7.2.0
test1
Output for 5.3.19 - 5.6.28
Catchable fatal error: Argument 1 passed to Test::test2() must be an instance of string, string given, called in /in/r1nRJ on line 12 and defined in /in/r1nRJ on line 3
Process exited with code 255.