3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'a\\\\,b,c\\,d'; $str2 = 'a\\\\,b,c\\,d'; var_dump(preg_split('/(?<!(?<!\\\\)\\\\),/', $str)); var_dump(preg_split('/(?<![^\\\\])(?<!\\\\),/', $str2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7iHVI
function name:  (null)
number of ops:  17
compiled vars:  !0 = $str, !1 = $str2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'a%5C%5C%2Cb%2Cc%5C%2Cd'
    3     1        ASSIGN                                                   !1, 'a%5C%5C%2Cb%2Cc%5C%2Cd'
    4     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'preg_split'
          4        SEND_VAL                                                 '%2F%28%3F%3C%21%28%3F%3C%21%5C%5C%29%5C%5C%29%2C%2F'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'preg_split'
         11        SEND_VAL                                                 '%2F%28%3F%3C%21%5B%5E%5C%5C%5D%29%28%3F%3C%21%5C%5C%29%2C%2F'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.98 ms | 1394 KiB | 17 Q