PHP Velho Oeste 2024

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.

반환값

값을 반환하지 않습니다.

참고

add a note add a note

User Contributed Notes 1 note

up
1
Massimiliano Arione
8 years ago
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
To Top