3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<STR This is <a href="http://foo.com">This is #foo</a>. Simple #html-stuff text <a href="http://foobar.com#baz">#simple</a> <span class="simple">simple #simple text text</span> <span>foo #simple"onclick="alert('hi')" another STR; echo preg_replace('/(?!<a[^<>]*>[^#]+)#(\b[-_\w]+\b)(?![^<]*<\/a>)/', '<a href="/tags/$1">#$1</a>', $str);
Output for git.master, git.master_jit, rfc.property-hooks
This is <a href="http://foo.com">This is #foo</a>. Simple <a href="/tags/html-stuff">#html-stuff</a> text <a href="http://foobar.com#baz">#simple</a> <span class="simple">simple <a href="/tags/simple">#simple</a> text text</span> <span>foo <a href="/tags/simple">#simple</a>"onclick="alert('hi')" another

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:
36.91 ms | 402 KiB | 8 Q