title: PHP protected classes and properties, protected from whom?
body: <p>I'm just getting started with OOP PHP with <em>PHP Object-Oriented Solutions</em> by David Powers, and am a little curious about the notion of protection in OOP.</p>
  
  <p>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 <code>class.php</code> and manually tweak whatever they pleased seeing as how PHP is always in plain text.</p>
  
  <p>Caution: all of the above written by a beginner with a beginner's understanding of programming.</p>