Hour 17. Advanced Objects

What You’ll Learn in This Hour:

  • How to define class constants

  • How to define and work with static properties and methods

  • How to overload calls to object properties and methods

  • How to prevent a child class from overriding a method

  • How to automate clean-up when an object is discarded

  • How to handle error conditions

  • How to define types using abstract classes and interfaces

In Hour 9, “Objects,” we covered the least you should know to work with objects in PHP. In this hour, we are going to look at objects in more detail. We will look especially at some of the many new features that PHP 5 has introduced. With PHP 5, the language became much more amenable to object-oriented design. In this hour, we will discover how the language ...

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.