Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Sort an array by key in descending order
<?php krsort(array &$array, int $flags = SORT_REGULAR): true
<?php         if (! array_is_list($array)) {

            $descending

                    ? krsort($array, $options)

                    : ksort($array, $options);

        } else {

            $descending
<?php     {

        $items = $this->items;



        $descending ? krsort($items, $options) : ksort($items, $options);



        return new static($items);

    }