uksort

PHP 4, PHP 5, PHP 7, PHP 8
uksort - Sort an array by keys using a user-defined comparison function
Manual
Code Examples

Example #1 uksort example

Result: an apple: 3 a banana: 4 the Earth: 2 John: 1
PHP Version: