3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class U {}; class V {}; class W {}; class A { public function __construct(U $a, V $b) { // echo $a . PHP_EOL; } public function functionName($a) { } } class B extends A { public function __construct(W $c) { parent::__construct(new U(), new V()); } public function functionName() { } } $x = new B(new W()); $x->functionName();
Output for 7.0.0 - 7.2.0
Warning: Declaration of B::functionName() should be compatible with A::functionName($a) in /in/1oPKY on line 26
Output for 5.4.11 - 5.6.28
Strict Standards: Declaration of B::functionName() should be compatible with A::functionName($a) in /in/1oPKY on line 26
Output for 5.3.21 - 5.3.29
Strict Standards: Declaration of B::functionName() should be compatible with that of A::functionName() in /in/1oPKY on line 26