3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class I { abstract public function qwer(); } abstract class A { public function asdf(I $a) { $a->qwer(); } } class C extends I { public function qwer() { echo "yep"; } } class B extends A { public function asdf(C $asdf) { parent::asdf($asdf); } } $par = new C(); (new B())->asdf($par);
Output for 7.1.0
Warning: Declaration of B::asdf(C $asdf) should be compatible with A::asdf(I $a) in /in/lcX6p on line 24 yep