Even if documentation says that $cmp_function must be a string, this method works with a Callable also.
$iterator->uasort([$this, 'usort']); // 'usort' here is a method in the same class
(PHP 5 >= 5.2.0)
ArrayIterator::uasort — User defined sort
Sort the entries by values using user defined function.
This function is currently not documented; only its argument list is available.
The compare function used for the sort.
No value is returned.