ArrayIterator::uasort

(PHP 5 >= 5.2.0)

ArrayIterator::uasortUser defined sort

Description

public void ArrayIterator::uasort ( string $cmp_function )

Sort the entries by values using user defined function.

Warning

This function is currently not documented; only its argument list is available.

Parameters

cmp_function

The compare function used for the sort.

Return Values

No value is returned.

See Also

Коментарии

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
2015-11-05 17:35:55
http://php5.kiev.ua/manual/ru/arrayiterator.uasort.html

    Поддержать сайт на родительском проекте КГБ