3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function logmsg(string $msg, int $level, float $severity) { var_dump($msg); // string(1) "1" var_dump($level); // int(2) var_dump($severity); // float(3) } logmsg(1, "2.5", 3);
Output for 7.0.0 - 7.2.0
string(1) "1" int(2) float(3)
Output for 5.5.0 - 5.6.28
Catchable fatal error: Argument 1 passed to logmsg() must be an instance of string, integer given, called in /in/YtR5X on line 8 and defined in /in/YtR5X on line 3
Process exited with code 255.