3v4l.org

run code in 300+ PHP versions simultaneously
<?php function removeQuotedValues($string) { $pattern = '#``(.*?)`#'; $string = preg_replace($pattern, '', $string); $replace = array(' ' => '', '(,' => '(', ',)' => ')', ',,' => ','); foreach ($replace as $old => $new) { $string = str_replace($old, $new, $string); } return $string; } $string = '(`g3tR1d0fM3`, 1,2), (1,2,3, `14ls0n33dr3m0v1ng`),(2 ,3 ,3) '; echo removeQuotedValues($string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QRfMH
function name:  (null)
number of ops:  6
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN                                                   !0, '%28%60g3tR1d0fM3%60%2C+1%2C2%29%2C+%281%2C2%2C3%2C+%6014ls0n33dr3m0v1ng%60%29%2C%282+%2C3++%2C3%29+'
   17     1        INIT_FCALL                                               'removequotedvalues'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function removequotedvalues:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/QRfMH
function name:  removeQuotedValues
number of ops:  22
compiled vars:  !0 = $string, !1 = $pattern, !2 = $replace, !3 = $new, !4 = $old
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, '%23%60%60%28.%2A%3F%29%60%23'
    6     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !0, $6
    7     8        ASSIGN                                                   !2, <array>
    8     9      > FE_RESET_R                                       $9      !2, ->19
         10    > > FE_FETCH_R                                       ~10     $9, !3, ->19
         11    >   ASSIGN                                                   !4, ~10
    9    12        INIT_FCALL                                               'str_replace'
         13        SEND_VAR                                                 !4
         14        SEND_VAR                                                 !3
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !0, $12
    8    18      > JMP                                                      ->10
         19    >   FE_FREE                                                  $9
   11    20      > RETURN                                                   !0
   12    21*     > RETURN                                                   null

End of function removequotedvalues

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.25 ms | 1398 KiB | 18 Q