asort
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Sort an array in ascending order and maintain index association
asort
(array &
$array
,
int $flags
=
SORT_REGULAR
):
bool
$callback
&&
is_callable
(
$callback
)
?
uasort
(
$items
,
$callback
)
:
asort
(
$items
,
$callback
??
SORT_REGULAR
);
return new static(
$items
);
}
src/Illuminate/Collections/Collection.php
}
$descending
?
arsort
(
$results
,
$options
)
:
asort
(
$results
,
$options
);
src/Illuminate/Collections/Collection.php