3v4l.org

run code in 300+ PHP versions simultaneously
<?php $File = new SplFileObject(__FILE__); echo 'SplFileObject::__toString(): ', (string) htmlspecialchars($File), PHP_EOL; echo 'SplFileInfo::__toString(): ', (string) htmlspecialchars($File->getFileInfo()), PHP_EOL; echo PHP_EOL; echo "Now let's loop through the file", PHP_EOL; foreach ($File as $line) { echo htmlspecialchars($line), PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
SplFileObject::__toString(): &lt;?php SplFileInfo::__toString(): /in/t4O4f Now let's loop through the file &lt;?php $File = new SplFileObject(__FILE__); echo &#039;SplFileObject::__toString(): &#039;, (string) htmlspecialchars($File), PHP_EOL; echo &#039;SplFileInfo::__toString(): &#039;, (string) htmlspecialchars($File-&gt;getFileInfo()), PHP_EOL; echo PHP_EOL; echo &quot;Now let&#039;s loop through the file&quot;, PHP_EOL; foreach ($File as $line) { echo htmlspecialchars($line), PHP_EOL; }

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:
50.84 ms | 402 KiB | 8 Q