October 2011
Intermediate to advanced
400 pages
9h 23m
English
In this chapter, we’ll be taking a look at object oriented programming, or OOP. Whether you’ve used OOP before in PHP or not, this chapter will show you what it is, how it’s used, and why you might want to use objects rather than plain functions and variables. We’ll cover everything from the “this is how you make an object” basics through to interfaces, exceptions, and magic methods. The object oriented approach is more conceptual than technical—although there are some long words used that we’ll define and demystify as we go!
Since it’s clearly possible to write complex and useful websites using only functions, you might wonder why taking another step and using OOP techniques is worth ...