3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "[url=https://test.com]my link[/url]"; echo preg_replace('~\[url=([^][\s]+)]([^][]*)\[/url]~', "<a href='$1' target='_blank'>$2</a>", $text) . PHP_EOL; echo preg_replace('~\[url=([^][\s]+)](.*?)\[/url]~s', "<a href='$1' target='_blank'>$2</a>", $text);
Output for git.master, git.master_jit, rfc.property-hooks
<a href='https://test.com' target='_blank'>my link</a> <a href='https://test.com' target='_blank'>my link</a>

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:
23.98 ms | 401 KiB | 8 Q