Objects are used to store and organize data. Object-oriented programming structures found in many programming languages are also evident in PHP; however, in PHP it is not required that you write your scripts in an object-oriented manner. Many PHP scripts, in fact most of the ones you will find in this book, are procedural rather than object-oriented. If you are coming to PHP with a background in object-oriented programming, this chapter will help you to understand the object model in PHP. If you are new to programming altogether, it's important to understand the basics of object-oriented programming, but you might want to gain experience in procedural programming and the fundamentals of the PHP language before you tackle a topic that has entire books written on it.
In this chapter, you learn the basics of working with objects, including