3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test(int $a) { var_dump($a); } $string = "123abc"; test($string);
based on j023M
Output for 7.0.0 - 7.2.0
Notice: A non well formed numeric value encountered in /in/Tc5KD on line 3 int(123)
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/Tc5KD on line 8 and defined in /in/Tc5KD on line 3
Process exited with code 255.