Javatpoint Logo
Javatpoint Logo

PHP array_key_first() function

The array_key_first( ) function is used to get the first key of an array. This function was introduced in PHP 7.3.0



Parameter Description Is compulsory
array Specifies the array. compulsory

Return Values

The array_key_first( ) function returns the first key of the array if the array is not empty, otherwise null.

IMPORTANT NOTE- The above two functions are introduced in PHP 7.3.0 that is not released officially that's why example is not given in the above functions.

Help Others, Please Share

facebook twitter pinterest