<?php function printer() { $line = 1; while (true) { $string = yield; echo ($line++).$string.PHP_EOL; } } $printer = printer(); $printer->send('Hello world!'); $printer->send('Bye world!');
You have javascript disabled. You will not be able to edit any code.