Iterator::key
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
Return the key of the current element
Description
Iterator::key(): mixed
Returns the key of the current element.
Parameters Parameters
Return Values
Returns scalar on success, or null on failure.
Errors/Exceptions
Issues E_NOTICE on failure.