← All docs
ksort()
Sorts an array by key in ascending SORT_REGULAR order; PHP sort flags are not yet supported.
ksort()
function ksort(array $array): bool
Sorts an array by key in ascending 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/ksort.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how ksort is implemented in the compiler, see the internals page.