← All docs

end()

Moves the array's internal pointer to the last element and returns it.

end()

function end(array $array): mixed

Moves the array’s internal pointer to the last element and returns it.

Parameters:

  • $array (array), passed by reference

Returns: mixed

Availability

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

Internals

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