3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A {} class B extends A {} class Handler { public function handle(A $a) {} } class HandlerB extends Handler { public function handle($a) {} } $handlerA = new Handler(); $handlerB = new HandlerB(); $handlerA->handle(new A()); $handlerB->handle(new B());
based on i6uXQ
Output for 7.2.0 - 7.3.0rc3
Output for 7.0.28 - 7.1.23
Warning: Declaration of HandlerB::handle($a) should be compatible with Handler::handle(A $a) in /in/SSh18 on line 13
Output for 5.6.38
Strict Standards: Declaration of HandlerB::handle() should be compatible with Handler::handle(A $a) in /in/SSh18 on line 13