← All docs

uksort()

Sorts an array by keys using a user-defined comparison function.

uksort()

function uksort(array $array, callable $callback): bool

Sorts an array by keys using a user-defined comparison function.

Parameters:

  • $array (array), passed by reference
  • $callback (callable)

Returns: bool

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

Internals

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