3v4l.org

run code in 500+ PHP versions simultaneously
<?php $text = "[url=https://test.com]my link[/url]"; echo preg_replace('~\[url=([^][\s]+)]([^][]*)\[/url]~', "<a href='$1' target='_blank'>$2</a>", $text) . PHP_EOL; echo preg_replace('~\[url=([^][\s]+)](.*?)\[/url]~s', "<a href='$1' target='_blank'>$2</a>", $text);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qtMeO
function name:  (null)
number of ops:  9
compiled vars:  !0 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%5Burl%3Dhttps%3A%2F%2Ftest.com%5Dmy+link%5B%2Furl%5D'
    4     1        FRAMELESS_ICALL_3                preg_replace        ~2      '%7E%5C%5Burl%3D%28%5B%5E%5D%5B%5Cs%5D%2B%29%5D%28%5B%5E%5D%5B%5D%2A%29%5C%5B%2Furl%5D%7E', '%3Ca+href%3D%27%241%27+target%3D%27_blank%27%3E%242%3C%2Fa%3E'
          2        OP_DATA                                                      !0
          3        CONCAT                                               ~3      ~2, '%0A'
          4        ECHO                                                         ~3
    5     5        FRAMELESS_ICALL_3                preg_replace        ~4      '%7E%5C%5Burl%3D%28%5B%5E%5D%5B%5Cs%5D%2B%29%5D%28.%2A%3F%29%5C%5B%2Furl%5D%7Es', '%3Ca+href%3D%27%241%27+target%3D%27_blank%27%3E%242%3C%2Fa%3E'
          6        OP_DATA                                                      !0
          7        ECHO                                                         ~4
          8      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.97 ms | 2157 KiB | 13 Q