O'Reilly logo

PHP Master by Matthew Turland, Lorna Mitchell, Davey Shafik

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1Object Oriented Programming

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!

Why OOP?

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 the hassle. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required