1
0
mirror of https://github.com/php/php-src.git synced 2026-04-15 20:11:02 +02:00
Files
archived-php-src/Zend/tests/generators
Sara Golemon 0fb640c717 Fix bug where yield from is captured too greedily
In the following piece of code:

```php
function from1234($x) {
  return $x;
}
function foo($x) {
  yield from1234($x);
}
```

The statement inside foo is taken as `yield from` `1234($x)`
which is neither the intent, nor even legal syntax for an fcall.

Do a lookahead for breaking non-label characters after the
`yield from` and only accept it if they occur.
2017-03-23 13:31:06 -07:00
..
2015-04-14 16:35:23 +02:00