phpday 2027 - Call for Papers

CachingIterator::valid

(PHP 5, PHP 7, PHP 8)

CachingIterator::valid — 現在の要素が有効かどうかをチェックする

説明

public function CachingIterator::valid(): bool

現在の要素が有効かどうかをチェックします。

CachingIterator には、 CachingIterator::rewind() をコールするまで現在の要素がありません。 foreach では自動的にコールされます。

パラメータ

この関数にはパラメータはありません。

戻り値

現在の要素が有効な場合に true、それ以外の場合に false を返します。

参考

User Contributed Notes

There are no user contributed notes for this page.
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top