3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "<h1>This is a test page from ".gethostname()." </h1>"; $sum = 0; for ($i = 1; $i <= 10; $i++) { $sum += $i; echo "+ (".$i.")\n"; } echo "=\n[".$sum."]\n"; echo "<h1>If this opens correctly </h1>"."\n"."<h1>and adds variables to 55</h1>"." \n"."<h1>then PHP5 has been successfully installed.</h1>\n\n" ?> Below is the script used to output what you see above.<br><br> <?php highlight_string('<?php echo "<h1>This is a test page from ".gethostname()." </h1>"; $sum = 0; for ($i = 1; $i <= 10; $i++) { $sum += $i; echo "+ (".$i.")\n"; } echo "=\n[".$sum."]\n"; echo "<h1>If this opens correctly </h1>"."\n"."<h1>and adds variables to 55</h1>"." \n"."<h1>then PHP5 has been successfully installed.</h1>\n\n" ?>'); ?>
Output for git.master, git.master_jit, rfc.property-hooks
<h1>This is a test page from 3v4l.org </h1>+ (1) + (2) + (3) + (4) + (5) + (6) + (7) + (8) + (9) + (10) = [55] <h1>If this opens correctly </h1> <h1>and adds variables to 55</h1> <h1>then PHP5 has been successfully installed.</h1> Below is the script used to output what you see above.<br><br> <code><span style="color: #000000"> <span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"&lt;h1&gt;This&nbsp;is&nbsp;a&nbsp;test&nbsp;page&nbsp;from&nbsp;"</span><span style="color: #007700">.</span><span style="color: #0000BB">gethostname</span><span style="color: #007700">().</span><span style="color: #DD0000">"&nbsp;&lt;/h1&gt;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$sum&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />for&nbsp;(</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">$i</span><span style="color: #007700">++)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$sum&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">$i</span><span style="color: #007700">;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"+&nbsp;("</span><span style="color: #007700">.</span><span style="color: #0000BB">$i</span><span style="color: #007700">.</span><span style="color: #DD0000">")\n"</span><span style="color: #007700">;&nbsp;<br />}<br /><br />echo&nbsp;</span><span style="color: #DD0000">"=\n["</span><span style="color: #007700">.</span><span style="color: #0000BB">$sum</span><span style="color: #007700">.</span><span style="color: #DD0000">"]\n"</span><span style="color: #007700">;&nbsp;<br />echo&nbsp;</span><span style="color: #DD0000">"&lt;h1&gt;If&nbsp;this&nbsp;opens&nbsp;correctly&nbsp;&lt;/h1&gt;"</span><span style="color: #007700">.</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">.</span><span style="color: #DD0000">"&lt;h1&gt;and&nbsp;adds&nbsp;variables&nbsp;to&nbsp;55&lt;/h1&gt;"</span><span style="color: #007700">.</span><span style="color: #DD0000">"&nbsp;\n"</span><span style="color: #007700">.</span><span style="color: #DD0000">"&lt;h1&gt;then&nbsp;PHP5&nbsp;has&nbsp;been&nbsp;successfully&nbsp;installed.&lt;/h1&gt;\n\n"<br /></span><span style="color: #0000BB">?&gt;</span> </span> </code>

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:
38.05 ms | 409 KiB | 8 Q