Iterator::key

(PHP 5, PHP 7, PHP 8)

Iterator::keyReturn the key of the current element

Опис

public Iterator::key(): mixed

Returns the key of the current element.

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

Returns scalar on success, or null on failure.

Помилки/виключення

Issues E_NOTICE on failure.