krsort()
function krsort(array $array, int $flags = 0): bool
Sorts an array by key in descending order, comparing keys under $flags.
Parameters:
$array(array), passed by reference$flags(int), default0, optional
Returns: bool
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a 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.