IntlSort - Configure and create a Sorter instance to order your array elements

Code
<?php

use Budgegeria\IntlSort\Builder;

$sortBuilder = new Builder('de_DE');
$sorter = $sortBuilder->upperCaseFirst()
    ->orderByDesc()
    ->getSorter();

$array = ['a', 'g', 'A', 'ß', 'ä', 'j', 'z'];

$sortedArray = $sorter->sort($array);

dump($sortedArray);
Result
^ array:7 [
6 => "z"
3 => "ß"
5 => "j"
1 => "g"
4 => "ä"
0 => "a"
2 => "A"
]