ArrayIterator
PHP Manual

ArrayIterator::uasort

(PHP 5 >= 5.2.0, PHP 7)

ArrayIterator::uasortUser defined sort

说明

public void ArrayIterator::uasort ( string $cmp_function )

Sort the entries by values using user defined function.

Warning

本函数还未编写文档,仅有参数列表。

参数

cmp_function

The compare function used for the sort.

返回值

没有返回值。

参见

User Contributed Notes

Massimiliano Arione 06-Nov-2015 12:35
Even if documentation says that $cmp_function must be a string, this method works with a Callable also.
Example:

<?php

$iterator
->uasort([$this, 'usort']);  // 'usort' here is a method in the same class

ArrayIterator
PHP Manual