PHP 8.6.0RC7 available for testing

CachingIterator::key

(PHP 5, PHP 7, PHP 8)

CachingIterator::key — Return the key for the current element

Açıklama

public function CachingIterator::key(): mixed

Returns the key of the current element.

As the CachingIterator is one element ahead of its inner iterator, this is the key that was stored when the iterator last moved, not the current key of the inner iterator.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

Returns the key of the current element, or null if the iterator is not valid.

Ayrıca Bakınız

+add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top