1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 14:01:01 +02:00
Files
archived-php-src/Zend/tests/generators/yield_from_iterator_agregate.phpt
2016-04-04 09:35:48 +03:00

18 lines
264 B
PHP

--TEST--
yield from with an IteratorAggregate
--FILE--
<?php
class foo implements \IteratorAggregate {
public $prop = 1;
function getIterator() {
var_dump($this->prop);
yield;
}
}
(function(){
yield from new foo;
})()->next();
?>
--EXPECT--
int(1)