3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Deadpool 2 [Region 4](Blu-ray)"; echo trim(preg_replace("/\s*(?:\[[^][]*]|\([^()]*\))/","", $string));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tQQ7O
function name:  (null)
number of ops:  11
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Deadpool+2+%5BRegion+4%5D%28Blu-ray%29'
    4     1        INIT_FCALL                                               'trim'
          2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F%5Cs%2A%28%3F%3A%5C%5B%5B%5E%5D%5B%5D%2A%5D%7C%5C%28%5B%5E%28%29%5D%2A%5C%29%29%2F'
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                         $3      
          9        ECHO                                                     $3
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.01 ms | 1001 KiB | 15 Q