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

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

update php

File size: 264 bytes
Line 
1--TEST--
2yield from with an IteratorAggregate
3--FILE--
4<?php
5class foo implements \IteratorAggregate {
6  public $prop = 1;
7  function getIterator() {
8    var_dump($this->prop);
9    yield;
10  }
11}
12(function(){
13  yield from new foo;
14})()->next();
15?>
16--EXPECT--
17int(1)
Note: See TracBrowser for help on using the repository browser.