Consequences in PHP of implementing an interface through two different routes?
- by Daniel Bingham
What are the consequences of implementing the same interface through two different routes in PHP, are there any?
What I mean, is something like this:
interface baseInterface {}
abstract class baseClass implements baseInterface { }
interface myInterface extends baseInterface {}
class myClass extends baseClass implements myInterface {}
In this case myClass implements baseInterface from two different parents - myInterface and baseClass. Are there any consequences to this? My instinct is that PHP should handle this fine, but I just want to make sure. What exactly does PHP do in this case? Does it just check to see that the necessary functions are implemented for the interface each time it discovers it and call it a day or does it do something more?