Abstract class vs interfaces this is the most asked interview question. Interviewer generally want to know what is abstract class and interfaces. How well you understand the difference between abstract class and interface.
In this blog post, I’ll discuss what is an interface in PHP. How interfaces help us to manage codebase. What’s the importance of an interface in our code ?
What is Interface in PHP ?
Interfaces allow you to define a common structure for class. You can think an interface as a contract. Through interfaces, we lay out some rules, the classes that implement interfaces must follow those rules.
NOTE : Interfaces will not add any additional functionality in your code but it outlines a standard format to which your classes need to use.