title: Checking if variable exists for child class
body: <p>I'm creating global setters and getters for my parent class since I don't want to create them for each child class variable (but I will occasionally overwrite the parent global setter / getter).</p>
  
  <p>I'm using __call with it and I'm parsing the method name like this:</p>
  
  <pre><code>if (strtolower(substr($method, 0, 3)) == "set") {
    $variable = strtolower(substr($method, 3));
  }
  </code></pre>
  
  <p>The question is how can I check if the $variable is set for the child class (the one that is extending the main one);</p>
  
  <p>If I do:</p>
  
  <pre><code>if ($this-&gt;$variable)
  </code></pre>
  
  <p>I suppose it first check if it exists on the child class and then it checks if it exists on the main class. I want it only to check the child class, is this possible to do?</p>
  
  <p>I know there's parent:: but is there an equivalent for child?</p>
  
  <p><strong>EDIT:
  People are not understanding what I'm asking.
  I know how to check if the property exists. What I want to know is how to check if the property exists for the CHILD class, not for the MAIN class.
  (class CHILD extends MAIN)</strong></p>