3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface A{ function __construct(Foo $f); } class B implements A { function __construct(Bar $b){} } class C{ function __construct(Foo $f){} } class D extends C { function __construct(Bar $b){} }
based on No2rS
Output for 7.0.0 - 7.3.0alpha1
Fatal error: Declaration of B::__construct(Bar $b) must be compatible with A::__construct(Foo $f) in /in/rFttu on line 7
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Declaration of B::__construct() must be compatible with A::__construct(Foo $f) in /in/rFttu on line 7
Process exited with code 255.