3v4l.org

run code in 500+ PHP versions simultaneously
<?php $result = preg_replace('~\[(img|url)\](.*)\[/\1\]~i', 'REPLACED', '[img]test[/img][not]img[/not][url]http][/url][img]second image[/img]'); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8SdNd
function name:  (null)
number of ops:  5
compiled vars:  !0 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   FRAMELESS_ICALL_3                preg_replace        ~1      '%7E%5C%5B%28img%7Curl%29%5C%5D%28.%2A%29%5C%5B%2F%5C1%5C%5D%7Ei', 'REPLACED'
          1        OP_DATA                                                      '%5Bimg%5Dtest%5B%2Fimg%5D%5Bnot%5Dimg%5B%2Fnot%5D%5Burl%5Dhttp%5D%5B%2Furl%5D%5Bimg%5Dsecond+image%5B%2Fimg%5D'
          2        ASSIGN                                                       !0, ~1
    3     3        ECHO                                                         !0
    4     4      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
132.41 ms | 473 KiB | 7 Q