3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo() { yield 1; yield 2; yield 3; return ' 4'; } function goo($a, $b, $c) { print "$a $b $c"; } print PHP_EOL; goo(...foo()); goo(...($g = foo())); echo $g->getReturn(); ?>
Output for 8.1.32 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.21, 8.5.0 - 8.5.6
1 2 31 2 3 4

preferences:
39.89 ms | 850 KiB | 4 Q