← All docs

krsort()

Sorts an array by key in descending order.

krsort()

function krsort(array $array): bool

Sorts an array by key in descending order.

Parameters:

  • $array (array), passed by reference

Returns: bool

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how krsort is implemented in the compiler, see the internals page.