(PHP 7 >= 7.3.0)
array_key_last — Gets the last key of an array
array_key_last ( array $array ) : int|string|null
Get the last key of the given array
without affecting the internal array pointer.
array
An array.
Returns the last key of array
if the array is not empty; null
otherwise.
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.array-key-last.php