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

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
string(1) "a" int(1) NULL
Output for Array change keys
string(1) "a" int(1) NULL
Output for Lexical anon
string(1) "a" int(1) NULL

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page