- var_dump: documentation ( source)
- strcmp: documentation ( source)
- str_rot13: documentation ( source)
- uksort: documentation ( source)
<?php
$arr = [
"89098"=> "one",
"aaaa123" => "two",
"9" => "three",
5 => "four",
"7!?2,,--" => "five",
];
uksort($arr, function($a, $b){
return $a > $b;
});
var_dump($arr);
uksort($arr, function($a, $b){
$a = str_rot13($a);
$b = str_rot13($b);
return strcmp($a, $b);
});
var_dump($arr);