We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code (https://3v4l.org/pvIjH):
<?php function yieldFromIteratorGeneratorThrows() { try { yield from new class(new ArrayIterator([1, -2])) extends IteratorIterator { public function key() { if ($k = parent::key()) { throw new Exception; } return $k; } }; } catch (Exception $e) { yield 2; } } foreach (yieldFromIteratorGeneratorThrows() as $k => $v) { var_dump($v); }
Resulted in this output:
int(1)
But I expected this output instead:
int(1) int(2)
PHP 7.2 - master
No response
The text was updated successfully, but these errors were encountered:
1364945
bwoebi
No branches or pull requests
Description
The following code (https://3v4l.org/pvIjH):
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 7.2 - master
Operating System
No response
The text was updated successfully, but these errors were encountered: