Iterator::key

(PHP 5, PHP 7, PHP 8)

Iterator::keyReturn the key of the current element

Descrição

abstract public Iterator::key ( ) : scalar

Returns the key of the current element.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

Returns scalar on success, or null on failure.

Erros

Issues E_NOTICE on failure.