php / 8.1.5 / generator.valid.html /

Generator::valid

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

Generator::validCheck if the iterator has been closed

Description

public Generator::valid(): bool

Parameters

This function has no parameters.

Return Values

Returns false if the iterator has been closed. Otherwise returns true.

© 1997–2021 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/generator.valid.php