title: Use Reflection to find the class that a method belongs to
body: <p>I'm working in Magento, but this is more of a general PHP question. The situation is that within Magento, there are classes that extend classes that extend classes that extend classes. I want to be able to quickly find which class actually contains the definition for a method and/or if that method is actually <a href="http://www.php.net/manual/en/language.oop5.magic.php" rel="nofollow">magic</a>.</p>
  
  <p>So for instance, if I'm 10 levels deep into classes extending others, and 4 of those 10 classes have a method called <code>getHtml</code>, I want to be able to find out which one of those methods is actually being called when I call <code>$this-&gt;getHtml()</code>. I would also like to be able to tell if <code>getHtml</code> is actually a magic method.</p>
  
  <p>How can I do this with the PHP Reflection Class, or any other programmatic means?</p>