3v4l.org

run code in 500+ PHP versions simultaneously
<?php $qry = '[url="google.com"]google[/url] and [img]image here[/img]'; echo preg_replace('~\[(img|url)\b[^]]*](.*?)\[/\1]~is', 'REPLACED', $qry);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a8iWi
function name:  (null)
number of ops:  5
compiled vars:  !0 = $qry
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%5Burl%3D%22google.com%22%5Dgoogle%5B%2Furl%5D+and+%5Bimg%5Dimage+here%5B%2Fimg%5D'
    4     1        FRAMELESS_ICALL_3                preg_replace        ~2      '%7E%5C%5B%28img%7Curl%29%5Cb%5B%5E%5D%5D%2A%5D%28.%2A%3F%29%5C%5B%2F%5C1%5D%7Eis', 'REPLACED'
          2        OP_DATA                                                      !0
          3        ECHO                                                         ~2
          4      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
125.29 ms | 473 KiB | 7 Q