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("/(?<=href=\")[^\"]+\"/", $url, $match); var_dump($match); //echo preg_replace("/(?<=href=\")[^\"]+\"/", "\2&afr=ad", $url);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e93HD
function name:  (null)
number of ops:  10
compiled vars:  !0 = $url, !1 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cdiv%3E%3Ca+class%3D%22nk%22+href%3D%22http%3A%2F%2Fweibo.cn%2Fu%2F1610526293%3Fst%3D968f%22%3E%E9%98%B3%E5%85%89%E4%B8%8B%E7%9A%84%E9%9B%AA%E6%B5%B7%3C%2Fa%3E%3Cspan+class%3D%22ctt%22%3E%3A%3Ca+href%3D%22http%3A%2F%2Fweibo.cn%2Fpages%2F100808topic%3Fextparam%3D%25E4%25B8%25AD%25E5%259B%25BD%25E4%25B9%258B%25E5%25A3%25B0%26amp%3Bfrom%3Dfeed%26amp%3Bst%3D968f%22+class%3D%22k%22%3E%23%E4%B8%AD%E5%9B%BD%E4%B9%8B%E5%A3%B0%23%3C%2Fa%3E+++%3Ca+href%3D%22http%3A%2F%2Fweibo.cn%2Fsinaurl%3Ff%3Dw%26amp%3Bu%3Dhttp%253A%252F%252Ft.cn%252FzO2NEZA%26amp%3Bst%3D968f%22%3Ehttp%3A%2F%2Ft.cn%2FzO2NEZA%3C%2Fa%3E%3C%2Fspan%3E++++++++++++++++%26nbsp%3B%3Ca+href%3D%22http%3A%2F%2Fweibo.cn%2Fattitude%2FzAueIaySO%2Fadd%3Fuid%3D1704540003%26amp%3Brl%3D0%26amp%3Bst%3D968f%22%3E%E8%B5%9E%5B0%5D%3C%2Fa%3E%26nbsp%3B%3Ca+href%3D%22http%3A%2F%2Fweibo.cn%2Frepost%2FzAueIaySO%3Fuid%3D1610526293%26amp%3Brl%3D0%26amp%3Bst%3D968f%22%3E%E8%BD%AC%E5%8F%91%5B0%5D%3C%2Fa%3E%26nbsp%3B%3Ca+href%3D%22http%3A%2F%2Fweibo.cn%2Fcomment%2FzAueIaySO%3Fuid%3D1610526293%26amp%3Brl%3D0%26amp%3Bst%3D968f%23cmtfrm%22+class%3D%22cc%22%3E%E8%AF%84%E8%AE%BA%5B0%5D%3C%2Fa%3E%26nbsp%3B%3Ca+href%3D%22http%3A%2F%2Fweibo.cn%2Ffav%2FaddFav%2FzAueIaySO%3Frl%3D0%26amp%3Bst%3D968f%22%3E%E6%94%B6%E8%97%8F%3C%2Fa%3E%3C%21----%3E%26nbsp%3B%3Cspan+class%3D%22ct%22%3E1%E5%88%86%E9%92%9F%E5%89%8D%26nbsp%3B%E6%9D%A5%E8%87%AA%E6%89%8B%E6%9C%BA%E5%BE%AE%E5%8D%9A%E8%A7%A6%E5%B1%8F%E7%89%88%3C%2Fspan%3E%3C%2Fdiv%3E'
    3     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%28%3F%3C%3Dhref%3D%22%29%5B%5E%22%5D%2B%22%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    4     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    5     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.17 ms | 1387 KiB | 17 Q