3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string="{1},[2],(3),<4>"; // Replaces closing square, curly, angle brackets with round brackets $string = preg_replace('/[{[<]/', '(', $string); $string = preg_replace('/[}>\]]/', ')', $string); echo $string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/URvcb
function name:  (null)
number of ops:  9
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%7B1%7D%2C%5B2%5D%2C%283%29%2C%3C4%3E'
    4     1        FRAMELESS_ICALL_3                preg_replace        ~2      '%2F%5B%7B%5B%3C%5D%2F', '%28'
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !0, ~2
    5     4        FRAMELESS_ICALL_3                preg_replace        ~4      '%2F%5B%7D%3E%5C%5D%5D%2F', '%29'
          5        OP_DATA                                                      !0
          6        ASSIGN                                                       !0, ~4
    6     7        ECHO                                                         !0
    7     8      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.39 ms | 2222 KiB | 13 Q