1--TEST-- 2Check if recursion with yield from works 3--FILE-- 4<?php 5 6function from($a = 0) { 7 yield 1 + $a; 8 if ($a <= 3) { 9 yield from from($a + 3); 10 yield from from($a + 6); 11 } 12 yield 2 + $a; 13} 14 15function gen() { 16 yield from from(); 17} 18 19foreach(gen() as $v) { 20 var_dump($v); 21} 22?> 23--EXPECT-- 24int(1) 25int(4) 26int(7) 27int(8) 28int(10) 29int(11) 30int(5) 31int(7) 32int(8) 33int(2) 34