title: Get Object properties for sub(inherited) class - Excluding Base class properties
body: <p>I am using <em>PHP</em> and the funciton <em>get_object_vars()</em></p>
  
  <p>I have two classes</p>
  
  <pre><code>class A
  {
      var $color = 'blue';
      var $wood = 'oak';
  }
  
  class B extends A
  {
  }
  </code></pre>
  
  <p>If we run the following code</p>
  
  <pre><code>$B = new B();
  $B-&gt;website = 'stackoverflow';
  
  var_dump(get_object_vars($B));
  </code></pre>
  
  <p>The output is </p>
  
  <pre><code>array(3) {
  ["color"]=&gt;
  string(4) "blue"
  ["wood"]=&gt;
  string(3) "oak"
  ["website"]=&gt;
  string(13) "stackoverflow"
  }
  </code></pre>
  
  <p>My ideal output would be</p>
  
  <pre><code>array(1) {
  ["website"]=&gt;
  string(13) "stackoverflow"
  }
  </code></pre>
  
  <p>Is this possible?</p>