Q&A

Q1: This hour introduced some unfamiliar concepts. Do I really need to understand object-oriented programming to become a good PHP programmer?
A1: The short answer is no. Most PHP scripts use little or no object-oriented code at all. The object-oriented approach won’t help you do things that you couldn’t otherwise achieve. The benefits of object-oriented programming lie in the organization of your scripts, their reusability, and their extensibility. The benefits of object-oriented design can be enormous, however, which is one reason why PHP 5 provides extended support for objects.

Even if you decide not to produce object-oriented code, you might need to decipher third-party programs that contain classes. This hour should help you understand ...

Get Sams Teach Yourself PHP in 24 Hours, Third Edition 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.