This does not work:
interface TestInterface
{
public function testMethod();
}
interface TestInterface2
{
public function testMethod();
}
class TestClass implements TestInterface, TestInterface2
{
}
Gives me an error:
Fatal error: Cannot inherit the abstract function TestInterface2 :: testMethod () (previously declared abstraction in TestInterface).
It is right? Why is this not allowed? Doesn't make sense to me.
This also happens with abstract functions, for example, if you implement an interface and then inherit from a class with an abstract function with the same name.
source
share