← All docs

sort()

Sorts an array in ascending order.

sort()

function sort(array $array): bool

Sorts an array in ascending order.

Parameters:

  • $array (array), passed by reference

Returns: bool

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

Internals

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