O'Reilly logo

PHP and MySQL Web Development, Third Edition by Laura Thomson, Luke Welling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Object-Oriented PHP

This chapter explains concepts of object-oriented (OO) development and shows how they can be implemented in PHP. PHP5 introduces a new, more powerful object-oriented implementation, which makes classes and objects more useful.

Now PHP's OO implementation has all the features you would expect in a fully object-oriented language. We point out each of the new features as we go through this chapter for those of you who have previously used PHP4 or earlier.

Key topics covered in this chapter include

  • Object-oriented concepts

  • Classes, attributes, and operations

  • Class attributes

  • Per-class constants

  • Class method invocation

  • Inheritance

  • Access modifiers

  • Static methods

  • Type hinting

  • Object cloning

  • Abstract classes

  • Class design

  • Implementation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required