The uksort() function of the ArrayObject class in PHP is used to sort the entries present in the ArrayObject according to the keys following a user-defined function. They key-value mapping is preserved after sorting the ArrayObject.
Parameters: This function accepts a single parameter $comparator which is the user defined comparison function. This comparison function in turn accepts two arguments which are the keys of the ArrayObject and returns less than, equals to or greater than zero if the first argument is less than, equals to or greater than zero respectively.
Return Value: This function does not returns any value.
Below program illustrate the above function:
ArrayObject Object ( [storage:ArrayObject:private] => Array (  => GfG  => to  => Welcome ) )
- PHP | uksort() Function
- PHP | ArrayIterator uksort() Function
- ArrayObject offsetGet() Function in PHP
- ArrayObject offsetSet() Function in PHP
- PHP | ArrayObject unserialize() Function
- ArrayObject offsetUnset() Function in PHP
- PHP | ArrayObject setIteratorClass() Function
- ArrayObject append() function in PHP
- ArrayObject offsetExists() Function in PHP
- ArrayObject natsort() Function in PHP
- ArrayObject getIterator() Function in PHP
- ArrayObject getArrayCopy() Function in PHP
- ArrayObject natcasesort() Function in PHP
- ArrayObject ksort() Function in PHP
- ArrayObject exchangeArray() function in PHP
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.