3v4l.org

run code in 300+ PHP versions simultaneously
<?php function splitallowescape($str) { preg_match_all('/(?:[^\x5c,]|\x5c(?:.|$))+/', $str, $matches); foreach($matches[0] as $key => $match) { $matches[0][$key] = str_replace(array("\\\\"),array("\\"),$match); } return $matches[0]; } var_dump(splitallowescape("a,b")) ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CVZjW
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'splitallowescape'
          2        SEND_VAL                                                 'a%2Cb'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   14     6      > RETURN                                                   1

Function splitallowescape:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 19
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/CVZjW
function name:  splitallowescape
number of ops:  23
compiled vars:  !0 = $str, !1 = $matches, !2 = $match, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28%3F%3A%5B%5E%5Cx5c%2C%5D%7C%5Cx5c%28%3F%3A.%7C%24%29%29%2B%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    6     6        FETCH_DIM_R                                      ~5      !1, 0
          7      > FE_RESET_R                                       $6      ~5, ->19
          8    > > FE_FETCH_R                                       ~7      $6, !2, ->19
          9    >   ASSIGN                                                   !3, ~7
    8    10        INIT_FCALL                                               'str_replace'
         11        SEND_VAL                                                 <array>
         12        SEND_VAL                                                 <array>
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $11     
         15        FETCH_DIM_W                                      $9      !1, 0
         16        ASSIGN_DIM                                               $9, !3
         17        OP_DATA                                                  $11
    6    18      > JMP                                                      ->8
         19    >   FE_FREE                                                  $6
   10    20        FETCH_DIM_R                                      ~12     !1, 0
         21      > RETURN                                                   ~12
   11    22*     > RETURN                                                   null

End of function splitallowescape

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.25 ms | 1398 KiB | 20 Q