Chapter 3. Using PHP classes effectively

3.1 Visibility: private and protected methods and variables 41
3.2 The class without objects: class methods, variables, and constants 49
3.3 Abstract classes and methods (functions) 56
3.4 Class type hints 57
3.5 Interfaces 60
3.6 Summary 64

From stone axes to passenger airlines, objects—real, tangible ones—are ubiquitous in technology. From that perspective, it’s hardly surprising that software technology has come to depend on virtual objects. Classes, on the other hand, are something else. Naming, putting things into categories or classes, is inherent in natural language, but talking about categories of things and the process of naming is foreign to physical technology. Classes come out of philosophy ...

Get PHP in Action: Objects, Design, Agility now with O’Reilly online learning.

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