The ClosedGeneratorException class

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

Introduction

A ClosedGeneratorException is thrown when trying to retrieve a value from a closed Generator.

Class synopsis

classClosedGeneratorExceptionextendsException {
protectedstring$message = "";
privatestring$string = "";
protectedint$code;
protectedstring$file = "";
protectedint$line;
privatearray$trace = [];
private?Throwable$previous = null;
publicException::__construct(string$message = "", int$code = 0, ?Throwable$previous = null)
finalpublicException::getCode(): int
finalpublicException::getLine(): int
}
To Top