« 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   current   yield   getReturn   next   rewind   send   throw   valid   wakeup   stdClass   インターフェイス   インスタンス   概要   final   implements   Iterator   function key   Throwable   exception   参考   反復   目次
関連する関数・ページ:
generator.getreturn   generator.next   generator.current   generator.throw   generator.key   generator.valid