3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = function () { yield 1; echo 'hello'; yield 2; yield 3; echo 'world'; yield 4; }; foreach ($x() as $y) { echo $y; }
based on 20OZd
Output for 5.6.0 - 7.3.0
1hello23world4