3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { function hello(int $test) { var_dump($test); } } $test = new Test; $test->hello(1.5);
based on kBJE8
Output for hhvm-3.15.4, 7.0.0 - 7.3.0beta1
int(1)
Output for 5.6.0 - 5.6.30
Catchable fatal error: Argument 1 passed to Test::hello() must be an instance of int, double given, called in /in/hJ06f on line 12 and defined in /in/hJ06f on line 5
Process exited with code 255.