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>, qwe <a href="//arrivo.ru/w/sd/ger.html">123</a>, qwe <a href="http://yandex.ru/index.html">123</a>, qwe <a href="/smth/else">123</a>, http://www.arrivo.ru/nooo.html :)'; $text = preg_replace('#<a (.+)((http:|https:)?//(www\.)?arrivo\.ru|/[^/])/(.+)\.html(.+)>#isU', '<a $1$2/$5$6', $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>, qwe <a href="//arrivo.ru/w/sd/ger"123</a>, qwe <a href="http://yandex.ru/index.html">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:
49.58 ms | 401 KiB | 8 Q