title: public/protected class properties don't override private properties on parent classes?
body: <p>Declare a private property on a Parent class, and then redeclare that property as public or protected on a Child class.</p>
  
  <p>When you create an instance of the Child class, and invoke a method that is inherited from the Parent class. The property on the Parent class is used, and not the property on the Child class.</p>
  
  <p>This is not the case if the initial declaration of the property on the Parent class is public or protected.</p>
  
  <p>Could someone explain to me why this is?</p>
  
  <pre><code>&lt;?php
  
  class P {
      private $foo = 'bar';
  
      public function e()
      {
          echo get_class($this);
          echo "\n";
          echo $this-&gt;foo;
          echo "\n";
      }
  }
  
  class C extends P
  {
      protected $foo = 'baz';
  }
  
  $parent = new P();
  $child = new C();
  
  $parent-&gt;e();
  $child-&gt;e();
  
  Output:
  P
  bar
  C
  bar
  
  Expected Output:
  P
  bar
  C
  baz
  </code></pre>