run code in 200+ php & hhvm versions
Bugs & Features
<?php function count_to_ten() { $t = (yield from seven_eight()); echo '$'.var_dump($t); return 'ok'; } function seven_eight() { $k = yield;echo '#'; var_dump($k); foreach ([1, 2, 3] as $k => $v) { yield $v; } } $gen = count_to_ten(); foreach ($gen as $k => $num) { echo $gen->send('t'); echo "\n-$k -> $num \n"; } var_dump( $gen->getReturn());
based on 2lZkJ

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)