3v4l.org

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