3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface OriginalContract { } interface MoreSpecificContract extends OriginalContract { } class Foo { public function foo(OriginalContract $item) {} } class Bar extends Foo { public function foo(MoreSpecificContract $item) {} }
Output for 7.0.0 - 7.2.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Foo has a deprecated constructor in /in/sS22X on line 11 Warning: Declaration of Bar::foo(MoreSpecificContract $item) should be compatible with Foo::foo(OriginalContract $item) in /in/sS22X on line 19
Output for 5.4.4 - 5.6.28
Strict Standards: Declaration of Bar::foo() should be compatible with Foo::foo(OriginalContract $item) in /in/sS22X on line 19
Output for 5.4.2 - 5.4.3

Process exited with code 139.
Output for 5.3.18 - 5.3.29
Strict Standards: Declaration of Bar::foo() should be compatible with that of Foo::foo() in /in/sS22X on line 19