3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = '!1 aaa !2 bb bb !5 cc cc cc !4 dd'; echo preg_replace('~!(\d+)\s*(.*?)\s*(?=!\d|$)~s', "<div class=\"x\$1\">\$2</div>\n", $txt);
Output for git.master, git.master_jit, rfc.property-hooks
<div class="x1">aaa</div> <div class="x2">bb bb</div> <div class="x5">cc cc cc</div> <div class="x4">dd</div>

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:
146.75 ms | 405 KiB | 5 Q