title: PHP - get_class_methods() Problem
body: <p>I've this sample code:</p>
  
  <pre><code>class A
  {
   public function A_A() { /* ... */ }
  
   public function A_B() { /* ... */ }
  }
  
  class B extends A
  {
   public function B_A() { /* ... */ }
  
   public function B_B() { /* ... */ }
  
   public function B_C()
   {
    return get_class_methods($this);
   }
  }
  
  $a = new A();
  $b = new B();
  </code></pre>
  
  <p>Doing this:</p>
  
  <pre><code>echo '&lt;pre&gt;';
  print_r($b-&gt;B_C());
  echo '&lt;/pre&gt;';
  </code></pre>
  
  <p>Yields the following output:</p>
  
  <pre><code>Array
  (
      [0] =&gt; B_A
      [1] =&gt; B_B
      [2] =&gt; B_C
      [3] =&gt; A_A
      [4] =&gt; A_B
  )
  </code></pre>
  
  <p><strong>How can I make it return only the following methods?</strong></p>
  
  <pre><code>Array
  (
      [0] =&gt; B_A
      [1] =&gt; B_B
      [2] =&gt; B_C
  )
  </code></pre>
  
  <p>I've a method in class A that should call all the methods in class B, the problem is of course that it leads to a infinite loop due to the values returned by <code>get_class_methods()</code>.</p>