3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface a { public function foo(); } interface b extends a { public function baz(Baz $baz); } // Это сработает class c implements b { public function foo() { } public function baz(Baz $baz) { } } // Это не сработает и выдаст фатальную ошибку class d implements b { public function foo() { } public function baz(Foo $foo) { } }
Output for 7.0.0 - 7.2.0
Fatal error: Declaration of d::baz(Foo $foo) must be compatible with b::baz(Baz $baz) in /in/mQfhL on line 25
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Declaration of d::baz() must be compatible with b::baz(Baz $baz) in /in/mQfhL on line 26
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Fatal error: Declaration of d::baz() must be compatible with that of b::baz() in /in/mQfhL on line 26
Process exited with code 255.