How to add additional parameters to usort/uasort cmp function?
<p>I would like to have this $sort_flags array available within the compare_by_flags function, but I didn't find a way to this, is it possible?</p>

<pre><code>public function sort_by_rank(array $sort_flags = array()) {
    uasort($this-&gt;search_result_array, array($this, 'compare_by_flags'));
}

private static function compare_by_flags($a, $b) {
    // I want to have this $sort_flags array here to compare according to those flags      
}
</code></pre>
