3v4l.org

run code in 300+ PHP versions simultaneously
<?php function del1() { yield 1; return 'hi'; } function del2() { yield 2; } function g_master() { $x = yield from del1(); echo "lv ", $x, "\n"; yield 3; $y = yield from del2(); echo "lv2 ", $y, "\n"; yield 4; return 5; } foreach (g_master() as $x) { echo $x, "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
1 lv hi 3 2 lv2 4

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:
62.13 ms | 401 KiB | 8 Q