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

Last change on this file since 31874 was 31874, checked in by brainslayer, 2 months ago

update php

File size: 261 bytes
Line 
1--TEST--
2Bug #74157 (Segfault with nested generators)
3--FILE--
4<?php
5
6function a() {
7        $a = $b = $c = 2;
8        foreach(range(1, 5) as $v) {
9                yield $v;
10        }
11        return;
12}
13
14foreach (a(range(1, 3)) as $a) {
15        var_dump($a);
16}
17?>
18--EXPECTF--
19int(1)
20int(2)
21int(3)
22int(4)
23int(5)
Note: See TracBrowser for help on using the repository browser.