array_key_last


array_key_last ( $arr )

Parameters:
  • (array) arr An array.
Returns:
  • (string|int|null) The last key of array if the array . is not empty; `null` otherwise.
Defined at:

Description

Polyfill for `array_key_last()` function added in PHP 7.3.Get the last key of the given array without affecting the internal array pointer.

Related Functions

array_key_first, _wp_array_get, _wp_array_set, wp_array_slice_assoc, wp_parse_list

Top Google Results

User discussions

wpseek mobile