krsort
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Sort an array by key in descending order
krsort
(array &
$array
,
int $flags
=
SORT_REGULAR
):
bool
if (static::
isAssoc
(
$array
)) {
$descending
?
krsort
(
$array
,
$options
)
:
ksort
(
$array
,
$options
);
} else {
$descending
src/Illuminate/Collections/Arr.php
{
$items
=
$this
->
items
;
$descending
?
krsort
(
$items
,
$options
) :
ksort
(
$items
,
$options
);
return new static(
$items
);
}
src/Illuminate/Collections/Collection.php