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
return_by_ref has the same problem, it seems to me, however in generators there's the additional case of exceptions in destructors of previous key and values.
I wouldn't change the longstanding behaviour in current PHP versions, but should be fixed for PHP 8.2 possibly, for academical correctness at least.