3v4l.org

run code in 300+ PHP versions simultaneously
<?php function yield_range( $start, $end ){ while( $start <= $end ){ $ret = yield $start; $start++; echo "yield receive : ".$ret.PHP_EOL; } } $generator = yield_range( 1, 10 ); foreach( $generator as $item ){ $generator->send( $generator->current() * 10 ); echo "=====\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
yield receive : 10 ===== yield receive : yield receive : 30 ===== yield receive : yield receive : 50 ===== yield receive : yield receive : 70 ===== yield receive : yield receive : 90 ===== yield receive :

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

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


preferences:
177.85 ms | 405 KiB | 5 Q