source: src/router/php7/Zend/tests/generators/yield_from_greedy_parse.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 268 bytes
Line 
1--TEST--
2yield from parses too greedily
3--FILE--
4<?php
5
6function from1234($x) {
7  return $x;
8}
9
10function bar() {
11  yield 24;
12}
13
14function foo() {
15  yield from1234(42);
16  yield from(bar());
17}
18
19foreach (foo() as $value) {
20  var_dump($value);
21}
22--EXPECT--
23int(42)
24int(24)
Note: See TracBrowser for help on using the repository browser.