minwork/array
Minwork Array provides fast, well-tested helpers for nested, associative, and object arrays. Get/set/has plus map, filter, find, group, sort, and validation, with fluent-style chaining. No dependencies; modern PHP syntax.
Arr::getLastKey(array $array): int|string|null
Get the last key of the given array without affecting the internal array pointer.
Returns null if array is empty.
Arr::getLastKey(['a' => 1, 'b' => 2, 'c' => 3]) -> 'c'
Arr::getLastKey([1, 2, 3]) -> 2
Arr::getLastKey([]) -> null
How can I help you explore Laravel packages today?