3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C { } class A { public function foo(/* C */ $c) { echo 'c'; } } class B extends A { public function foo(C $c) { echo 'd'; } } $c = new C(); $b = new B(); echo $b->foo($c);
based on HPrqa
Output for 7.0.0 - 7.3.1
Warning: Declaration of B::foo(C $c) should be compatible with A::foo($c) in /in/s6f92 on line 17 d
Output for hhvm-3.18.5 - 3.22.0
d
Output for 5.6.0 - 5.6.30
Strict Standards: Declaration of B::foo() should be compatible with A::foo($c) in /in/s6f92 on line 17 d