Chapter 8. Objects

This chapter examines how you define, initialize, and use objects. It lays a foundation of what objects are and how object-oriented (OO) programming works by covering the following topics:

  • Defining and using objects

    • Defining and instantiating objects

    • Defining and using variables, constants, and operations

    • Getters and setters

  • Defining and using inheritance and polymorphism

    • Building subclasses and overriding operations

    • Using abstract classes and interfaces

  • Implementing objects

    • Cloning objects

    • Comparing objects, printing objects, and type hinting

    • Using object reflection

As discussed in the last chapter, procedural programming functions perform well-defined tasks, and they hide the details of their operation. A collection of functions can ...

Get Oracle Database 10g Express Edition PHP Web Programming 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.