This doesn\'t work:
interface TestInterface
{
public function testMethod();
}
interface TestInterface2
{
public function testMethod();
}
class Test
It makes no sense to implement two interfaces containing methods with the same signatures.
The compiler cannot know if the methods actually have the same purpose - if not, it would mean that at least one of the interfaces cannot be implemented by your class.
Example:
interface IProgram { function execute($what); /* executes the given program */ }
interface ISQLQuery { function execute($what); /* executes the given sql query */ }
class PureAwesomeness implements IProgram, ISQLQuery {
public function execute($what) { /* execute something.. but what?! */ }
}
So as you see, it's impossible to implement the method for both interfaces - and it'd also be impossible to call the method which actually implements the method from a given interface.