ArrayObject::uasort

ArrayObject::uasort

(PHP 5 >= 5.2.0, PHP 7)

ArrayObject::uasortSort the entries with a user-defined comparison function and maintain key association

Description

public void ArrayObject::uasort ( callable $cmp_function )

This function sorts the entries such that keys maintain their correlation with the entry that they are associated with, using a user-defined comparison function.

This is used mainly when sorting associative arrays where the actual element order is significant.