3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'qwe <a href="/asd/ghj/wer.html">123</a>, qwe <a href="http://www.arrivo.ru/asdwer.html">123</a>, <a href=\'http://www.arrivo.ru/asdwer.html\'>123</a>, qwe <a title="http://arrivo.ru/123.html" href=//arrivo.ru/w/sd/ger.html title="http://arrivo.ru/123.html">123</a> <a title="http://arrivo.ru/123.html" href=//arrivo.ru/w/sd/ger.html>123</a>, qwe <a href=http://yandex.ru/index.html title="smth">123</a>, qwe <a href="/smth/else">123</a>, http://www.arrivo.ru/nooo.html :)'; $text = preg_replace('#href(\s*)=(\s*)(|"|\')(\s*)((http:|https:)?//(www\.)?arrivo\.ru|/[^/])/(.+)\.html(.+)(>|\s|"|\')#isU', 'href$1=$2$3$4$5/$8$9$10>', $text); echo $text;
Output for git.master, git.master_jit, rfc.property-hooks
qwe <a href="/asd/ghj/wer.html">123</a>, qwe <a href="http://www.arrivo.ru/asdwer">>123</a>, <a href='http://www.arrivo.ru/asdwer'>>123</a>, qwe <a title="http://arrivo.ru/123.html" href=//arrivo.ru/w/sd/ger title=">http://arrivo.ru/123.html">123</a> <a title="http://arrivo.ru/123.html" href=//arrivo.ru/w/sd/ger>123</a>>, qwe <a href=http://yandex.ru/index.html title="smth">123</a>, qwe <a href="/smth/else">123</a>, http://www.arrivo.ru/nooo.html :)

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