3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo() { yield 'foo'; goo(); } function too() { yield 'too'; yield from goo(); } function hoo() { yield 'hoo'; yield goo(); } function goo() { yield 'goo'; } foreach(foo() as $a) { print $a.PHP_EOL;} // goo foreach(too() as $a) { print $a.PHP_EOL;} // too goo foreach(hoo() as $a) { print $a.PHP_EOL;} // hoo Uncaught Error: Object of class Generator // could not be converted to string ?>
Output for git.master_jit, git.master
foo too goo hoo Fatal error: Uncaught Error: Object of class Generator could not be converted to string in /in/Znbbl:26 Stack trace: #0 {main} thrown in /in/Znbbl on line 26
Process exited with code 255.

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:
19.7 ms | 865 KiB | 4 Q