3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'write {Hello, World!} in either the color {blue} or {red} or {#00AA00} and in either the font {Arial Black} or {Monaco} where both the color and the font are determined randomly'; echo "<ol>" , preg_replace_callback('~{([^}]*)}|(\S+)~', function($m) { if (!isset($m[2])) { return "<li><strong>{$m[1]}</strong></li>\n"; } return "<li>{$m[2]}</li>\n"; }, $text) , "<ol>";
Output for git.master, git.master_jit, rfc.property-hooks
<ol><li>write</li> <li><strong>Hello, World!</strong></li> <li>in</li> <li>either</li> <li>the</li> <li>color</li> <li><strong>blue</strong></li> <li>or</li> <li><strong>red</strong></li> <li>or</li> <li><strong>#00AA00</strong></li> <li>and</li> <li>in</li> <li>either</li> <li>the</li> <li>font</li> <li><strong>Arial Black</strong></li> <li>or</li> <li><strong>Monaco</strong></li> <li>where</li> <li>both</li> <li>the</li> <li>color</li> <li>and</li> <li>the</li> <li>font</li> <li>are</li> <li>determined</li> <li>randomly</li> <ol>

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:
71.48 ms | 407 KiB | 5 Q