This doesn't work:
interface TestInterface
{
public function testMethod();
}
interface TestInterface2
{
public function testMethod();
}
class TestClass implements TestInterface, TestInterface2
{
}
Gives me the error:
Fatal error: Can't inherit abstract function TestInterface2::testMethod() (previously declared abstract in TestInterface).
Is that correct? 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 that has an abstract function of the same name.
See Question&Answers more detail:os