3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test(int $test) { var_dump($test); } var_dump(NAN); test((int)NAN);
based on ap4Wh
Output for hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.3.0beta1
float(NAN) int(0)
Output for 5.6.0 - 5.6.30
float(NAN) Catchable fatal error: Argument 1 passed to test() must be an instance of int, integer given, called in /in/eLUZJ on line 6 and defined in /in/eLUZJ on line 2
Process exited with code 255.