← All docs

array_key_last()

Gets the last key of an array.

array_key_last()

function array_key_last(array $array): mixed

Gets the last key of an array.

Parameters:

  • $array (array)

Returns: mixed

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

Internals

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