PHP protected classes and properties, protected from whom?
- by Andrew Heath
I'm just getting started with OOP PHP via PHP Object-Oriented Solutions and am a little curious about the notion of protection in OOP.
The author clearly explains how protection works, but the bit about not wanting others to be able to change properties falls a bit flat.
I'm having a hard time imagining a situation where it is ever possible to prevent others from altering your classes, since they could just open up your class.php and manually tweak whatever they pleased seeing as how PHP is always in plaintext.
Caution:
all of the above written by a beginner
with a beginner's understanding of programming...