3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { yield 1; return "a"; } function goo($a) { print $a . PHP_EOL; } goo(...($generator = foo())); print $generator->getReturn(); // la foreach (($generator = foo()) as $b) { print $b . PHP_EOL; } print $generator->getReturn(); // la ?>
Output for git.master, git.master_jit
1 a1 a

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:
51.45 ms | 844 KiB | 4 Q