It should be noted that next() sends an implicit null into the generator to ensure that code execution isn't blocked if the generator is expecting a value to be sent into it and the code doesn't execute any send()
(PHP 5 >= 5.5.0, PHP 7, PHP 8)
Generator::next — Возобновить работу генератора
Вызов Generator::next()
имеет тот же эффект, что и вызов
Generator::send() с null
в качестве аргумента.
У этой функции нет параметров.
Функция не возвращает значения после выполнения.
It should be noted that next() sends an implicit null into the generator to ensure that code execution isn't blocked if the generator is expecting a value to be sent into it and the code doesn't execute any send()