title: PHP 5.3 OOP need answer
body: <p>Please tell me why:</p>
  
  <pre><code>class ClassOne {
      protected $a = 10;
  
      public function changeValue($b) {
          $this-&gt;a = $b;
      }
  }
  
  class ClassTwo extends ClassOne {
      protected $b = 10;
  
      public function changeValue($b) {
          $this-&gt;b = 10;
          parent::changeValue($this-&gt;a + $this-&gt;b);
      }
  
      public function displayValues() {
          print "a: {$this-&gt;a}, b: {$this-&gt;b}\n";
      }
  }
  
  $obj = new ClassTwo();
  
  $obj-&gt;changeValue(20);
  $obj-&gt;changeValue(10);    
  $obj-&gt;displayValues();
  </code></pre>
  
  <p>Prints <code>a: 30</code> and <code>b: 10</code>.</p>
  
  <p>I would appreciate an elaborate response. Thank you :)</p>
  
  <p>On a side note: This is actually an exam question I've looked over and did not quite understand it. Thank you for your responses.</p>