3v4l.org

run code in 500+ PHP versions simultaneously
<?php $text = 'some text [BUTTON link="www.test.com" label="Click here"] some text'; echo preg_replace( '/\[button link="([^"]+)" label="([^"]+)"]/i', '<a href="$1">$2</a>', $text );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6FYoE
function name:  (null)
number of ops:  5
compiled vars:  !0 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'some+text+%5BBUTTON+link%3D%22www.test.com%22+label%3D%22Click+here%22%5D+some+text'
    5     1        FRAMELESS_ICALL_3                preg_replace        ~2      '%2F%5C%5Bbutton+link%3D%22%28%5B%5E%22%5D%2B%29%22+label%3D%22%28%5B%5E%22%5D%2B%29%22%5D%2Fi', '%3Ca+href%3D%22%241%22%3E%242%3C%2Fa%3E'
    8     2        OP_DATA                                                      !0
          3        ECHO                                                         ~2
    9     4      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.77 ms | 1885 KiB | 13 Q