Chapter 2. Object-Oriented Programming

Object-oriented programming (commonly abbreviated OOP) is a relative newcomer to the world of programming. Before the advent of OOP, programming languages such as C, Pascal, and BASIC were written on a line-by-line basis. While such linear programming works, over time coders developed this better system that allows the programmer to more rapidly develop and alter sophisticated applications.

Today, Java and C++ are probably the two best-known OOP languages, and OOP is so popular that support for it has been incorporated into PHP even though PHP itself is written in a non-OOP language (namely, C). When working with objects in PHP, keeping in mind that PHP supports objects but is not a true OOP language (and ...

Get PHP Advanced for the World Wide Web: Visual QuickPro Guide 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.