3v4l.org

run code in 300+ PHP versions simultaneously
<?php function routeIterator(&$path) { while (!empty($path)) { yield $path[0]; array_shift($path); } } function exampleGenerator($path) { foreach ($routeIterator($path) as $chunk) { yield "Chunk: " . $chunk; echo " Sent value: " . yield . "\n"; } } foreach (exampleGenerator([1,2,3,4,5]) as $signal) { echo $signal; }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $routeIterator in /in/R6uop on line 11 Fatal error: Uncaught Error: Value of type null is not callable in /in/R6uop:11 Stack trace: #0 /in/R6uop(17): exampleGenerator(Array) #1 {main} thrown in /in/R6uop on line 11
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:
48.36 ms | 401 KiB | 8 Q