When you need to add a function for a class, can you just extend the interface to a new interface that adds that function and implement the new interface with the class?
The PHP manual says "Note: Interfaces can be extended like classes using the extends operator."
https://www.php.net/manual/en/language.oop5.interfaces.php
When you need to add a function for a class, can you just extend the interface to a new interface that adds that function and implement the new interface with the class?
Interface cannot extend other interfaces, from what I know.
The PHP manual says "Note: Interfaces can be extended like classes using the extends operator." https://www.php.net/manual/en/language.oop5.interfaces.php
Pretty cool
Hmm, sorry for misleading you. Maybe it's just me - I just haven't USED it in this way, never had practical need to make such extending.