← All docs
krsort()
Sorts an array by key in descending SORT_REGULAR order; PHP sort flags are not yet supported.
krsort()
function krsort(array $array): bool
Sorts an array by key in descending SORT_REGULAR order; PHP sort flags are not yet supported.
Parameters:
$array(array), passed by reference
Returns: bool
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/array/krsort.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how krsort is implemented in the compiler, see the internals page.