3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f(&$gen) { yield 'foo'; $gen->throw(new Exception()); } $gen = f($gen); foreach($gen as $_) {} ?>
Output for git.master_jit, git.master
Warning: Uncaught Exception in /in/mlt4G:5 Stack trace: #0 /in/mlt4G(9): f(Object(Generator)) #1 {main} thrown in /in/mlt4G on line 5 Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/mlt4G on line 5
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Uncaught Exception in /in/mlt4G:5 Stack trace: #0 /in/mlt4G(9): f(Object(Generator)) #1 {main} Next Error: Cannot resume an already running generator in /in/mlt4G:5 Stack trace: #0 /in/mlt4G(5): Generator->throw(Object(Exception)) #1 /in/mlt4G(9): f(Object(Generator)) #2 {main} thrown in /in/mlt4G on line 5
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:
75.6 ms | 407 KiB | 5 Q