What is the difference between an Interface and an Abstract Class, and when would you choose one over the other?
Last updated
An interface is a pure contract of method signatures with no implementation or state. A class can
implementmany interfaces.An abstract class is a non-instantiable partial implementation mixing concrete methods, properties, and
abstractmethods. A class canextendonly one.Choose an interface for a capability shared by unrelated classes (e.g.
Countable), and an abstract class to share base logic among related types. Often you combine both: an abstract base implementing an interface.
- https://www.reddit.com/r/PHP/comments/1p6bprs/why_dont_major_companies_invest_in_phps_evolution/
- https://www.reddit.com/r/PHP/comments/1bp7tfh/what_is_the_future_of_php/
- https://www.quora.com/What-React-interview-questions-would-you-shoot-as-a-lead-developer
- https://www.imocha.io/blog/php-interview-questions-and-answers
- https://www.interviewbit.com/oops-interview-questions/
- https://en.wikipedia.org/wiki/PHP
- https://lemon.io/for-developers/php-developer-jobs/
- https://lan-portal.uob.edu.ly/visit/BOOK/529X432U02/modern-php_new__features_and_good-practices.pdf
- https://lan-portal.uob.edu.ly/upload/MD/D57953S372/modern-php__new_features_and__good__practices.pdf
- https://news.ycombinator.com/item?id=30786927
- https://kvnc-inc.medium.com/solid-principles-in-php-1c41069e9af6
- https://www.shkodenko.com/
- https://confoo.ca/en/2024/sessions