3v4l.org

run code in 500+ PHP versions simultaneously
<?php function liveLinks($text){ $trans = array("(" => "", ")" => ""); $reg_exUrl = '@(http(s)?://)?(([a-zA-Z])([-\w]+\.)+([^\s.]+\S*)+[^,.\s]+[^$()]+)@'; return preg_replace_callback($reg_exUrl, function($m) use ($trans) { return '<a href="http' . $m[2]. '://' . strtr($m[3], $trans) . '">' . strtr($m[0], $trans) . '</a>'; }, $text); } echo liveLinks('https://nimbusweb.me/s/share/3130667/59rpygxll4mm4ul5so()t');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/siREu
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                                   'livelinks'
          1        SEND_VAL                                                     'https%3A%2F%2Fnimbusweb.me%2Fs%2Fshare%2F3130667%2F59rpygxll4mm4ul5so%28%29t'
          2        DO_FCALL                                          0  $0      
          3        ECHO                                                         $0
          4      > RETURN                                                       1

Function livelinks:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/siREu
function name:  liveLinks
number of ops:  12
compiled vars:  !0 = $text, !1 = $trans, !2 = $reg_exUrl
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   RECV                                                 !0      
    3     1        ASSIGN                                                       !1, <array>
    4     2        ASSIGN                                                       !2, '%40%28http%28s%29%3F%3A%2F%2F%29%3F%28%28%5Ba-zA-Z%5D%29%28%5B-%5Cw%5D%2B%5C.%29%2B%28%5B%5E%5Cs.%5D%2B%5CS%2A%29%2B%5B%5E%2C.%5Cs%5D%2B%5B%5E%24%28%29%5D%2B%29%40'
    5     3        INIT_FCALL                                                   'preg_replace_callback'
          4        SEND_VAR                                                     !2
          5        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
          6        BIND_LEXICAL                                                 ~5, !1
    7     7        SEND_VAL                                                     ~5
          8        SEND_VAR                                                     !0
    5     9        DO_ICALL                                             $6      
    7    10      > RETURN                                                       $6
    8    11*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/siREu
function name:  {closure:liveLinks():5}
number of ops:  15
compiled vars:  !0 = $m, !1 = $trans
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
    6     2        FETCH_DIM_R                                          ~2      !0, 2
          3        CONCAT                                               ~3      '%3Ca+href%3D%22http', ~2
          4        CONCAT                                               ~4      ~3, '%3A%2F%2F'
          5        FETCH_DIM_R                                          ~5      !0, 3
          6        FRAMELESS_ICALL_2                strtr               ~6      ~5, !1
          7        CONCAT                                               ~7      ~4, ~6
          8        CONCAT                                               ~8      ~7, '%22%3E'
          9        FETCH_DIM_R                                          ~9      !0, 0
         10        FRAMELESS_ICALL_2                strtr               ~10     ~9, !1
         11        CONCAT                                               ~11     ~8, ~10
         12        CONCAT                                               ~12     ~11, '%3C%2Fa%3E'
         13      > RETURN                                                       ~12
    7    14*     > RETURN                                                       null

End of Dynamic Function 0

End of function livelinks

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.6 ms | 1561 KiB | 10 Q