3v4l.org

run code in 300+ PHP versions simultaneously
<?php $File = new SplFileObject(__FILE__); echo 'First dump: Just cast as string', "\n", $File, "\n"; echo 'Ok, now let\'s iterate echoing out $line var created by foreach', "\n"; foreach($File as $i => $line) { echo "#$i: ", $line; } echo "\n"; echo 'Ok, now let\'s echo out the object as string again', "\n", $File, "\n";
Output for git.master, git.master_jit
First dump: Just cast as string <?php Ok, now let's iterate echoing out $line var created by foreach #0: <?php #1: #2: $File = new SplFileObject(__FILE__); #3: #4: echo 'First dump: Just cast as string', "\n", $File, "\n"; #5: #6: echo 'Ok, now let\'s iterate echoing out $line var created by foreach', "\n"; #7: foreach($File as $i => $line) { #8: echo "#$i: ", $line; #9: } #10: echo "\n"; #11: #12: echo 'Ok, now let\'s echo out the object as string again', "\n", $File, "\n"; Ok, now let's echo out the object as string again Fatal error: Uncaught RuntimeException: Cannot read from file /in/PMcDV in /in/PMcDV:13 Stack trace: #0 /in/PMcDV(13): SplFileObject->__toString() #1 {main} thrown in /in/PMcDV on line 13
Process exited with code 255.
Output for rfc.property-hooks
First dump: Just cast as string <?php Ok, now let's iterate echoing out $line var created by foreach #0: <?php #1: #2: $File = new SplFileObject(__FILE__); #3: #4: echo 'First dump: Just cast as string', "\n", $File, "\n"; #5: #6: echo 'Ok, now let\'s iterate echoing out $line var created by foreach', "\n"; #7: foreach($File as $i => $line) { #8: echo "#$i: ", $line; #9: } #10: echo "\n"; #11: #12: echo 'Ok, now let\'s echo out the object as string again', "\n", $File, "\n"; Ok, now let's echo out the object as string again
Process exited with code 139.

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:
41.85 ms | 401 KiB | 8 Q