« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 2 of about 2 for printer (0.001 sec.)
値をジェネレータに送る 9357
« Generator::rewind Generator::throw » PHP Manual Generator 値をジェネレータに送る 検索 Generator::send (PHP 5 >= 5.5.0, PHP 7, PHP 8) Generator::send — 値をジェネレータに送る 説明 public function Generator::send ( mixed $value ): mixed 指定 ... している yield 式の戻り値になります。 戻り値 yield した値を返します。 例 例1 Generator::send() による値の注入 <?php function printer () { echo "I'm printer!" . PHP_EOL ; while ( true ) { $string = yield; echo $string . PHP_EOL ; } } $printer = printer (); ... $printer -> send ( 'Hello world!' ); $printer -> send ( 'Bye world!' ); ?> 上の例の出力は以下となります。 I'm printer! Hello world! ... Bye world! 関連キーワード: ジェネレータ Generator printer send yield world function mixed value 戻り値 echo string Hello Bye rewind Search throw 結果 続行 とき ...
https://man.mtool.work/php/8.3/generator.send.html
値をジェネレータに送る 9357
« Generator::rewind Generator::throw » PHP Manual Generator 値をジェネレータに送る 検索 Generator::send (PHP 5 >= 5.5.0, PHP 7, PHP 8) Generator::send — 値をジェネレータに送る 説明 public function Generator::send ( mixed $value ): mixed 指定 ... している yield 式の戻り値になります。 戻り値 yield した値を返します。 例 例1 Generator::send() による値の注入 <?php function printer () { echo "I'm printer!" . PHP_EOL ; while ( true ) { $string = yield; echo $string . PHP_EOL ; } } $printer = printer (); ... $printer -> send ( 'Hello world!' ); $printer -> send ( 'Bye world!' ); ?> 上の例の出力は以下となります。 I'm printer! Hello world! ... Bye world! 関連キーワード: ジェネレータ Generator printer send yield world mixed Hello rewind throw 続行 最初 送信 next 呼び水 注入 while ...
https://man.mtool.work/php/8.3/generator.send.html
PREV 1 NEXT