3v4l.org

run code in 300+ PHP versions simultaneously
<?php function markAnchor($str) { return preg_replace('/(#([0-9]+))/','<a href="show.php?id=$2">$1</a>',$str); } echo markAnchor("take a look at #42");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6a6cX
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'markanchor'
          1        SEND_VAL                                                 'take+a+look+at+%2342'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function markanchor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6a6cX
function name:  markAnchor
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%23%28%5B0-9%5D%2B%29%29%2F'
          3        SEND_VAL                                                 '%3Ca+href%3D%22show.php%3Fid%3D%242%22%3E%241%3C%2Fa%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
    5     7*     > RETURN                                                   null

End of function markanchor

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.14 ms | 1396 KiB | 16 Q