3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Bar { } class Foo { public function getBar(int $teste) { var_dump($teste); } } $foo = new Foo(); var_dump($foo->getBar(50.0));
based on ZQ2qC
Output for 7.0.0 - 7.2.0
int(50) NULL
Output for 5.3.18 - 5.6.28
Catchable fatal error: Argument 1 passed to Foo::getBar() must be an instance of int, double given, called in /in/B9mcX on line 17 and defined in /in/B9mcX on line 9
Process exited with code 255.