ArrayIterator::uasort

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

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

Açıklama

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.

Bilginize:

İki üye karşılaştırıldığında eşitse bunların sıralı dizi içindeki göreli sırası tanımsızdır.

Değiştirgeler

cmp_function

Karşılaştırma işlevinin, ilk bileşeninin ikinci bileşenden küçük, eşit veya büyük olması durumunda sıfırdan küçük, eşit veya büyük bir tamsayı döndürmesi gerekir.

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

Dönen Değerler

Hiçbir değer dönmez.

Ayrıca Bakınız

add a note add a note

User Contributed Notes

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