PHP & MySQL® Web Development All-in-One Desk Reference for Dummies®
by Janet Valade, Tricia Ballad, Bill Ballad
Chapter 4. Object-Oriented Programming
In This Chapter
Understanding object-oriented programming
Planning an object-oriented script
Defining and writing classes
Dealing with errors by using exceptions
Copying, comparing, and destroying objects
Object-oriented programming is an approach to programming that uses objects and classes. Object-oriented programming is in widespread use today, with many universities teaching object-oriented programming in beginning programming classes. Currently, Java and C++ are the most prevalent languages used for object-oriented programming.
Object-oriented programming, with a limited feature set, is possible in PHP 4. With PHP 5, the object-oriented capabilities of PHP were greatly improved, with both more speed and added features. The information and sample scripts in this chapter are written for PHP 5. Features that aren't available in PHP 4 are noted.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access