« stdClass
Generator::current »

Generator クラス

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

はじめに

Generator は ジェネレータ が返すオブジェクトです。

警告

Generator オブジェクトのインスタンスは 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
}

参考

オブジェクトの反復処理 も参照ください。

目次

関連キーワード:
Generator   ジェネレータ   mixed   yield   getReturn   rewind   send   throw   wakeup   stdClass   インターフェイス   インスタンス   final   implements   Iterator   function key   Throwable   exception   反復   キー   スロー   イテレータ   シリアライズ
関連する関数・ページ:
generator.next   generator.getreturn   generator.throw   generator.current   generator.valid   generator.key

他のマニュアルの関連ページ