You are working on a project where certain methods in your classes should only be defined but not implemented, and the actual implementation should be provided by the derived classes. Which PHP concept helps achieve this?

  • Interface
  • Trait
  • Abstract Class
  • Final Class
An interface defines method signatures without implementations. Derived classes that implement the interface must provide the implementation for those methods. This is a common approach in PHP to achieve this requirement.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *