3v4l.org

run code in 300+ 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:  8
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        INIT_FCALL                                               'preg_replace'
    6     2        SEND_VAL                                                 '%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'
    7     3        SEND_VAL                                                 '%3Ca+href%3D%22%241%22%3E%242%3C%2Fa%3E'
    8     4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
    9     7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.51 ms | 1398 KiB | 15 Q