数组 函数
PHP Manual

array_key_first

(PHP 7 >= 7.3.0)

array_key_firstGets the first key of an array

说明

mixed array_key_first ( array $array )

Get the first key of the given array without affecting the internal array pointer.

参数

array

An array.

返回值

Returns the first key of array if the array is not empty; NULL otherwise.

参见


数组 函数
PHP Manual