What is the difference between an interface and an abstract class in PHP?
- A An interface declares method signatures only and a class may implement many; a class may extend only one abstract class
- B An abstract class cannot contain methods
- C Interfaces can hold state
- D They are identical
Answer
An interface declares method signatures only and a class may implement many; a class may extend only one abstract class
Use an interface for the contract and an abstract class where subclasses genuinely share implementation and state.





