CakeFest 2024: The Official CakePHP Conference

Generator::valid

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

Generator::validイテレータが終了したかどうかを調べる

説明

public Generator::valid(): bool

パラメータ

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

戻り値

イテレータが終了した場合に false を返します。まだ終了していない場合は true を返します。

add a note

User Contributed Notes 1 note

up
1
Igor Frolov
4 years ago
Notice if you call it with open empty generator, it will close while checking.
To Top