You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// > Output:
// array(2) {
// [0]=>
// int(0)
// [1]=>
// int(0)
// }
// string(3) "--1"
// string(3) "--2"
// Fatal error: Uncaught Error: Impossible to yield from the Generator being currently run in ~/test.php:24
I know that that is correct exception.
But whats wrong i did understand in Generators idea...
How to correctly implement middleware stuff with generators?
Should there be some ->send('signal_name') support or like that?
Or maybe correct way is create function that could always create new generator from some $queue = []; and if i need to "continue" generator, actually create new one and send signal to break previous one replacing global variable to newly created?
PHP Version
PHP 7.2
Operating System
Windows 10
The text was updated successfully, but these errors were encountered:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you.
Description
Sorry, i just dont know where to put that question, guess only strong devs could help me with.
The following code:
Gives the output:
I know that that is correct exception.
But whats wrong i did understand in Generators idea...
How to correctly implement middleware stuff with generators?
Should there be some ->send('signal_name') support or like that?
Or maybe correct way is create function that could always create new generator from some
$queue = [];
and if i need to "continue" generator, actually create new one and send signal to break previous one replacing global variable to newly created?PHP Version
PHP 7.2
Operating System
Windows 10
The text was updated successfully, but these errors were encountered: