ArrayIterator::uasort

(PHP 5 >= 5.2.0, PHP 7, PHP 8)

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

Beschreibung

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.

Hinweis:

Wenn zwei Mitglieder als identisch verglichen werden, ist die relative Sortierung im sortierten Array nicht definiert.

Parameter-Liste

cmp_function

Die Vergleichsfunktion muss einen Integer kleiner als, gleich oder größer als Null zurückgeben, wenn das erste Argument respektive kleiner, gleich oder größer als das zweite ist.

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

Rückgabewerte

Es wird kein Wert zurückgegeben.

Siehe auch

add a note add a note

User Contributed Notes

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