© Frank M. Kromann 2018
Frank M. KromannBeginning PHP and MySQLhttps://doi.org/10.1007/978-1-4302-6044-8_7

7. Advanced OOP Features

Frank M. Kromann1 
(1)
Aliso Viejo, CA, USA
 
Chapter 6 introduced the fundamentals of object-oriented programming (OOP). This chapter builds on that foundation by introducing several of PHP’s more advanced OOP features. Specifically, this chapter introduces the following five features:
  • Object cloning: PHP treats all objects as references and they can be created with the use of the new operator. With that in mind, how do you go about creating a copy of an object if all objects are treated as references? By cloning the object.

  • Inheritance: As discussed in Chapter 6, the ability to build class hierarchies through inheritance ...

Get Beginning PHP and MySQL: From Novice to Professional now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.