Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<IteratorIterator::getInnerIteratorIteratorIterator::next>
^IteratorIteratorLast updated: Mon, 26 Oct 2026

IteratorIterator::key

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

IteratorIterator::key — Get the key of the current element

Description

public function IteratorIterator::key(): mixed

Get the key of the current element.

Parameters

This function has no parameters.

Return Values

The key of the current element.

See Also


<IteratorIterator::getInnerIteratorIteratorIterator::next>
^IteratorIteratorLast updated: Mon, 26 Oct 2026