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 $line) { echo $line , "\n"; } 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 <?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 $line) { echo $line , "\n"; } echo "\n"; 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/hk8V6 in /in/hk8V6:13 Stack trace: #0 /in/hk8V6(13): SplFileObject->__toString() #1 {main} thrown in /in/hk8V6 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 <?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 $line) { echo $line , "\n"; } echo "\n"; 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:
37.63 ms | 401 KiB | 8 Q