3v4l.org

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