PHP 7.2.25 Released

Generator::valid

(PHP 5 >= 5.5.0, PHP 7)

Generator::valid检查迭代器是否被关闭

说明

public Generator::valid ( void ) : bool

参数

此函数没有参数。

返回值

如果迭代器已被关闭返回 FALSE,否则返回 TRUE

add a note add a note

User Contributed Notes 1 note

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