3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string="{1},[2],(3),<4>"; $what = ['~[{[<]~', '~[]}>]~']; $with = ['(', ')']; $string = preg_replace($what, $with, $string); echo $string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/utIu9
function name:  (null)
number of ops:  11
compiled vars:  !0 = $string, !1 = $what, !2 = $with
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B1%7D%2C%5B2%5D%2C%283%29%2C%3C4%3E'
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    6     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !0, $6
    7     9        ECHO                                                     !0
    8    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.45 ms | 939 KiB | 16 Q