:<?php
interface FooInterface
{
}
class Foo implements FooInterface
{
}
interface BarInterface
{
public function fooAction($foo);
}
class Bar implements BarInterface
{
public function fooAction(FooInterface $foo)
{
}
}
$bar = new Bar;
$foo = new Foo;
$bar->fooAction($foo);
?>
:
Fatal error: Declaration of Bar::fooAction(FooInterface $foo) must be compatible with BarInterface::fooAction($foo) in /in/W31mP on line 23
Process exited with code 255.
:
Fatal error: Declaration of Bar::fooAction(FooInterface $foo) must be compatible with BarInterface::fooAction($foo) in /in/W31mP on line 21
Process exited with code 255.
:
Fatal error: Declaration of Bar::fooAction() must be compatible with BarInterface::fooAction($foo) in /in/W31mP on line 22
Process exited with code 255.
Output for 5.3.0 - 5.3.29
:
Fatal error: Declaration of Bar::fooAction() must be compatible with that of BarInterface::fooAction() in /in/W31mP on line 22
Process exited with code 255.
:
Fatal error: Declaration of Bar::fooAction() must be compatible with that of BarInterface::fooAction() in /in/W31mP on line 21
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING in /in/W31mP on line 3
Process exited with code 255.