run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo() { echo 'In generator func foo',"\n"; for ($i = 1; $i <= 4; $i++) { $string=(yield $i); if ($string == 'Hello World') { yield $string,"\n"; } } echo 'generator done and closed.',"\n"; return; } $generator = foo(); foreach ($generator as $value) { if ($value == 2) { $generator->send('Hello World'); } echo "$value\n"; }

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

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