<?php
interface Action
{
public function sayHello($string);
}
interface AddAction extends Action
{
public function sayHello($string, $test=false);
}
class Add implements AddAction
{
public function sayHello($string, $test=false)
{
echo $string, PHP_EOL;
}
}
$x = new Add();
$x->sayHello("hi");
Fatal error: Can't inherit abstract function Action::sayHello() (previously declared abstract in AddAction) in /in/UVT9T on line 9
Process exited with code 255.
Fatal error: Can't inherit abstract function Action::sayHello() (previously declared abstract in AddAction) in /in/UVT9T on line 8
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING in /in/UVT9T on line 3
Process exited with code 255.