Return current array index

- « SplFixedArray::jsonSerialize

- SplFixedArray::next »

- PHP Manual
- SplFixedArray
- Return current array index

# SplFixedArray::key

(PHP 5 >= 5.3.0, PHP 7)

SplFixedArray::key — Return current array index

### Description

public SplFixedArray::key(): int

Returns the current array index.

### Parameters

This function has no parameters.

### Return Values

The current array index.