array_key_first
array_key_first ( $array )
Parameters:Returns:- (string|int|null) The first key of array if the array is not empty; `null` otherwise.
Defined at: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Polyfill for array_key_first() function added in PHP 7.3.Get the first key of the given array without affecting
the internal array pointer.