Chapter 9. Working with Objects

In this chapter, you learn the following:

The basic structure of an object

How to create and manipulate objects and the data they contain

Programmers use objects to store and organize data. Object-oriented programming is a type of programming in which the structure of the program (or application) is designed around these objects and their relationships and interactions. Object-oriented programming structures are found in many programming languages, and are also evident in PHP. In fact, many PHP programmers—especially those coming from a highly object-oriented programming background—choose to develop PHP applications in an object-oriented way.

However, in PHP, it is not required that you write your scripts ...

Get Sams Teach Yourself PHP, MySQL® and Apache All in One, Fifth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.