Вступ
PHP Manual
PHP Manual»Predefined Interfaces and Classes»Generator

The Generator class

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

Generator objects are returned from generators.

Застереження

Generator objects cannot be instantiated via new.

final class Generator implements Iterator {
/* Методи */
public function current(): mixed
public function getReturn(): mixed
public function key(): mixed
public function next(): void
public function rewind(): void
public function send(mixed $value): mixed
public function throw(Throwable $exception): mixed
public function valid(): bool
public function __wakeup(): void
}

See also object iteration.

Зміст

To Top