3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = '<div><a class="nk" href="http://weibo.cn/u/1610526293?st=968f">阳光下的雪海</a><span class="ctt">:<a href="http://weibo.cn/pages/100808topic?extparam=%E4%B8%AD%E5%9B%BD%E4%B9%8B%E5%A3%B0&amp;from=feed&amp;st=968f" class="k">#中国之声#</a> <a href="http://weibo.cn/sinaurl?f=w&amp;u=http%3A%2F%2Ft.cn%2FzO2NEZA&amp;st=968f">http://t.cn/zO2NEZA</a></span> &nbsp;<a href="http://weibo.cn/attitude/zAueIaySO/add?uid=1704540003&amp;rl=0&amp;st=968f">赞[0]</a>&nbsp;<a href="http://weibo.cn/repost/zAueIaySO?uid=1610526293&amp;rl=0&amp;st=968f">转发[0]</a>&nbsp;<a href="http://weibo.cn/comment/zAueIaySO?uid=1610526293&amp;rl=0&amp;st=968f#cmtfrm" class="cc">评论[0]</a>&nbsp;<a href="http://weibo.cn/fav/addFav/zAueIaySO?rl=0&amp;st=968f">收藏</a><!---->&nbsp;<span class="ct">1分钟前&nbsp;来自手机微博触屏版</span></div>'; preg_match_all("/(?<=href=\")[^\"]+(?=\")/", $url, $match); var_dump($match); echo preg_replace("/(?<=href=\")([^\"]+)(?=\")/", "\\1&afr=ad", $url);
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { [0]=> array(7) { [0]=> string(36) "http://weibo.cn/u/1610526293?st=968f" [1]=> string(105) "http://weibo.cn/pages/100808topic?extparam=%E4%B8%AD%E5%9B%BD%E4%B9%8B%E5%A3%B0&amp;from=feed&amp;st=968f" [2]=> string(73) "http://weibo.cn/sinaurl?f=w&amp;u=http%3A%2F%2Ft.cn%2FzO2NEZA&amp;st=968f" [3]=> string(74) "http://weibo.cn/attitude/zAueIaySO/add?uid=1704540003&amp;rl=0&amp;st=968f" [4]=> string(68) "http://weibo.cn/repost/zAueIaySO?uid=1610526293&amp;rl=0&amp;st=968f" [5]=> string(76) "http://weibo.cn/comment/zAueIaySO?uid=1610526293&amp;rl=0&amp;st=968f#cmtfrm" [6]=> string(53) "http://weibo.cn/fav/addFav/zAueIaySO?rl=0&amp;st=968f" } } <div><a class="nk" href="http://weibo.cn/u/1610526293?st=968f&afr=ad">阳光下的雪海</a><span class="ctt">:<a href="http://weibo.cn/pages/100808topic?extparam=%E4%B8%AD%E5%9B%BD%E4%B9%8B%E5%A3%B0&amp;from=feed&amp;st=968f&afr=ad" class="k">#中国之声#</a> <a href="http://weibo.cn/sinaurl?f=w&amp;u=http%3A%2F%2Ft.cn%2FzO2NEZA&amp;st=968f&afr=ad">http://t.cn/zO2NEZA</a></span> &nbsp;<a href="http://weibo.cn/attitude/zAueIaySO/add?uid=1704540003&amp;rl=0&amp;st=968f&afr=ad">赞[0]</a>&nbsp;<a href="http://weibo.cn/repost/zAueIaySO?uid=1610526293&amp;rl=0&amp;st=968f&afr=ad">转发[0]</a>&nbsp;<a href="http://weibo.cn/comment/zAueIaySO?uid=1610526293&amp;rl=0&amp;st=968f#cmtfrm&afr=ad" class="cc">评论[0]</a>&nbsp;<a href="http://weibo.cn/fav/addFav/zAueIaySO?rl=0&amp;st=968f&afr=ad">收藏</a><!---->&nbsp;<span class="ct">1分钟前&nbsp;来自手机微博触屏版</span></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:
36.6 ms | 405 KiB | 8 Q