3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bbcode = '[dr]my name here-25[/dr]'; echo preg_replace('~\[dr](.+?)-(\d+)\[/dr]~', '<div>Reply to: <a href="user.php?id=$2">$1</a></div>', $bbcode);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b2dY8
function name:  (null)
number of ops:  8
compiled vars:  !0 = $bbcode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%5Bdr%5Dmy+name+here-25%5B%2Fdr%5D'
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%7E%5C%5Bdr%5D%28.%2B%3F%29-%28%5Cd%2B%29%5C%5B%2Fdr%5D%7E'
          3        SEND_VAL                                                 '%3Cdiv%3EReply+to%3A+%3Ca+href%3D%22user.php%3Fid%3D%242%22%3E%241%3C%2Fa%3E%3C%2Fdiv%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.86 ms | 1008 KiB | 14 Q