3v4l.org

run code in 300+ PHP versions simultaneously
<?php $File = new SplFileObject(__FILE__); echo 'SplFileObject::__toString(): ', (string) htmlspecialchars($File), PHP_EOL; echo PHP_EOL; echo "Now let's loop through the file"; foreach ($File as $line) { echo htmlspecialchars($line), PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
SplFileObject::__toString(): &lt;?php Now let's loop through the file&lt;?php $File = new SplFileObject(__FILE__); echo &#039;SplFileObject::__toString(): &#039;, (string) htmlspecialchars($File), PHP_EOL; echo PHP_EOL; echo &quot;Now let&#039;s loop through the file&quot;; 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:
51.24 ms | 402 KiB | 8 Q