3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function g1() { yield 1; yield 2; } function g2() { $a = yield; yield "a"; var_dump($a); $b = yield; yield "b"; var_dump($b); } $g1=g1(); $g2=g2(); foreach($g1 as $v) { var_dump($g2->send($v)); }
based on 7Ufga