O'Reilly logo

PHP in Action: Objects, Design, Agility by Chris Shiflett, Marcus Baker, Dagfinn Reiersol

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 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 ...

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