3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'xxxxxxxxxxxxxxxx[gallery columns="1" ids="137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161"]'; $pattern = '/\[(.*?)\]/i'; $replacement = ''; echo preg_replace($pattern, $replacement, $string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I3cTk
function name:  (null)
number of ops:  10
compiled vars:  !0 = $string, !1 = $pattern, !2 = $replacement
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'xxxxxxxxxxxxxxxx%5Bgallery+columns%3D%221%22+ids%3D%22137%2C138%2C139%2C140%2C141%2C142%2C143%2C144%2C145%2C146%2C147%2C148%2C149%2C150%2C151%2C152%2C153%2C154%2C155%2C156%2C157%2C158%2C159%2C160%2C161%22%5D'
    3     1        ASSIGN                                                   !1, '%2F%5C%5B%28.%2A%3F%29%5C%5D%2Fi'
    4     2        ASSIGN                                                   !2, ''
    5     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        ECHO                                                     $6
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.37 ms | 1385 KiB | 15 Q