3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tags = array("start" => "[highlight]", "finish" => "[/highlight]"); $text = 'Some normal text. [highlight]<?php echo $somedata; ?>[/highlight] Some normal text.'; $start = strpos($text,$tags['start']); $finish = strpos($text,$tags['finish']); $code = substr($text,$start+strlen($tags['start']),($finish-($start+strlen($tags['start'])))); $highlighted = highlight_string($code,true); $text = str_replace($code,"¬",$text); $text = str_replace("¬",$highlighted,$text); $text = str_replace($tags['start'],"",$text); $text = str_replace($tags['finish'],"",$text); echo $text.'<br />';
Output for git.master, git.master_jit, rfc.property-hooks
Some normal text. <code><span style="color: #000000"> <span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">$somedata</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span> </span> </code> Some normal text.<br />

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.35 ms | 402 KiB | 8 Q