Iterator::key

(PHP 5, PHP 7, PHP 8)

Iterator::keyReturn the key of the current element

Descrizione

public Iterator::key(): mixed

Returns the key of the current element.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns scalar on success, or null on failure.

Errori/Eccezioni

Issues E_NOTICE on failure.