3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); 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", 1, 3.2);
based on ncNOS
Output for 7.0.0 - 7.2.0
string(1) "1" int(1) float(3.2)
Output for 5.3.20 - 5.6.28
Warning: Unsupported declare 'strict_types' in /in/1eCTo on line 2 Catchable fatal error: Argument 1 passed to logmsg() must be an instance of string, string given, called in /in/1eCTo on line 8 and defined in /in/1eCTo on line 3
Process exited with code 255.