<?php
interface FooInterface
{
public function dump(self $baz);
}
class Foo implements FooInterface
{
public function dump(self $baz) {
var_dump($baz);
}
}
class Bar extends Foo
{
public function dump(Foo $baz)
{
parent::dump($baz);
}}
Fatal error: Declaration of Foo::dump(Foo $baz) must be compatible with FooInterface::dump(FooInterface $baz) in /in/FC8Dm on line 11
Process exited with code 255.
Fatal error: Declaration of Foo::dump(Foo $baz) must be compatible with FooInterface::dump(FooInterface $baz) in /in/FC8Dm on line 9
Process exited with code 255.
Fatal error: Declaration of Foo::dump() must be compatible with FooInterface::dump(FooInterface $baz) in /in/FC8Dm on line 10
Process exited with code 255.
Output for 5.4.0
Fatal error: Declaration of Bar::dump() must be compatible with FooInterface::dump(self $baz) in /in/FC8Dm on line 17
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Fatal error: Declaration of Bar::dump() must be compatible with that of FooInterface::dump() in /in/FC8Dm on line 17
Process exited with code 255.