title: (php) how to pass a class method as callback in array_filter?
body: <p>when calling <code>array_filter</code> with a php function you just should do</p>
  
  <pre><code>function myFunc($e) {
      return something($e);
  }
  array_filter($myArray,"myFunc");
  </code></pre>
  
  <p>but how do i pass a class method? (static or non-static)
  for example</p>
  
  <pre><code>class A {
      public function foo() {
          //code
          $a = array_filter($array,"self::myFilter");
          //or if myFilter is an instance method
          $a = array_filter($array,"this-&gt;myFilter");
      }
      public (static)? function myFilter($e) {return something($e);}
  }
  </code></pre>
  
  <p>i need because i will reuse my filter function in other places in the class, i tried using anonymous functions in static variables but i get error</p>