ArrayIterator::uasort

(PHP 5 >= 5.2.0, PHP 7)

ArrayIterator::uasortSort with a user-defined comparison function and maintain index association

Descrizione

public ArrayIterator::uasort ( callable $cmp_function ) : void

This method sorts the elements such that indices maintain their correlation with the values they are associated with, using a user-defined comparison function.

Nota:

If two members compare as equal, their relative order in the sorted array is undefined.

Elenco dei parametri

cmp_function

La funzione di confronto deve restituire un intero minore, uguale o maggiore di zero se il primo argomento รจ considerato essere minore, uguale o maggiore del secondo.

callback ( mixed $a, mixed $b ) : int

Valori restituiti

Nessun valore viene restituito.

Vedere anche:

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top