title: Array_filter in the context of an object, with private callback
body: <p>I want to filter an array, using the array_filter function. It hints at using call_user_func under water, but does not mention anything about how to use within the context of a class/object. </p>
  
  <p>Some pseudocode to explain my goal: </p>
  
  <pre><code>class RelatedSearchBlock {
    //...
    private function get_filtered_docs() {
      return array_filter($this-&gt;get_docs(), 'filter_item');
    }
  
    private filter_item() {
      return ($doc-&gt;somevalue == 123)
    }
  }
  </code></pre>
  
  <p>Would I need to change <code>'filter_item'</code> into <code>array($this, 'filter_item')</code> ? Is what I want possible at all?</p>