The New Object Model

Because this book did not introduce you to programming in PHP from an object-oriented point of view, this section will not go into detail and show examples of the object model changes in PHP 5. For that, I highly recommend Harry Fuecks' article “PHP5: Coming Soon to a Webserver Near You”, at http://www.sitepoint.com/article/1192/. This article contains an outstanding dissection of the object-related changes in PHP 5, and how to implement them.

The following bullet points provide an overview of the changes. If you are a Java developer, you will begin to notice strong similarities.

  • Private and protected variables and methods— Private variables and methods are only accessible from inside the class in which they are declared, ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.