Multiple Method In Interface¶
It is possible for a class to implements two interfaces that are defining the same method. The main condition is to have the same signature for these methods.
When the methods have different signature, with different argument counts, types or return types…, there is no conflict resolution: PHP checks the class’s method signature with the interfaces in order of definition, and it will stop at the first one that fails. This means that fixing the signature for the first interface leads to an error in the second one, but fixing the signature for the second interface leads to an errors for the first one. You’ll have to figure the cycle yourself to solve this.
See Also¶
Implementing twice the same method [Try me]