3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [1,2,3]; function a($x){ yield from $x; } foreach(a(a($arr)) as $x){ print_r($x); }
based on BPbB9
Output for 7.1.0, 7.2.0 - 7.2.33, 7.3.0 - 7.3.24, 7.4.0 - 7.4.5, 7.4.7 - 7.4.12, 8.0.0
123
Output for 7.4.6
1123