I don’t know whether to laugh or cry.
—ALF (TV series)
This chapter explores the crucial mechanisms for implementing the OOP concept in PHP. In particular, you get familiar with interfaces, abstract classes, and traits. You also get some notion about a namespace and anonymous classes. Let’s start with abstract classes.
Abstract Classes
When you create a class, you may not describe some methods but only declare them. In other words, you can specify ...