Chapter 2. Objects in PHP

2.1 Object fundamentals 19
2.2 Exception handling 25
2.3 Object references in PHP 4 and PHP 5 31
2.4 Intercepting method calls and class instantiation 34
2.5 Summary 39

It’s been said that most programming languages are at their best before they are implemented. That may be true for languages that were designed according to ambitious specifications, but PHP is definitely not one of those. Its humble beginnings are illustrated by the original meaning of the acronym PHP: Personal Home Page. It started out as a simple way to add dynamic content to HTML pages and grew into a more and more complete programming language. Object orientation was not originally part of the language, but has gradually grown in importance. Version ...

Get PHP in Action 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.