(Object Oriented Programming)
In object oriented programming Interfaces are synonymous with contracts. Classes that implement an interface are “contractually” bound to implement the same functions defined by the given interface it implements.
Contrary to abstract classes, interfaces can define methods but interface methods don’t have curlys or function bodies. Php interfaces simply define methods and when implemented on a class demand that the implementing class define the specific behavior for the function required by the interface.
Dive in with me, as we tackle interfaces in lesson 5 of our object oriented Php series!