3.9. PHP OOP - Interfaces
PHP - What are Interfaces?
An interface can define method names and arguments, but not the contents of the methods.
Any classes implementing an interface must implement all methods defined by the interface. Interfaces can't maintain Non-abstract methods.
Interfaces allow you to specify what methods a class should implement.
Syntax
PHP - Interfaces vs. Abstract Classes
Abstract class: | Interface: |
---|---|