3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function myErrorHandler($errno) { echo 'a'; } set_exception_handler('myErrorHandler'); class ClassA { public function method_a (ClassB $b) {} } class ClassWrong{} $a = new ClassA; $a->method_a(new ClassWrong); echo 'done.';
based on 0WCuK
Output for 7.0.0 - 7.2.0
a
Output for 5.3.18 - 5.6.28
Catchable fatal error: Argument 1 passed to ClassA::method_a() must be an instance of ClassB, instance of ClassWrong given, called in /in/kldXP on line 15 and defined in /in/kldXP on line 9
Process exited with code 255.