Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Sort an array with a user-defined comparison function and maintain index association
uasort(array &$array, callable $callback): bool
        $items $this->items;



        
$callback && is_callable($callback)

            ? 
uasort($items$callback)

            : 
asort($items$callback ?? SORT_REGULAR);



        return new static(
$items);