3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match_all('/\{?(.*?):\h*\"(.*?)\"(?:,|\}|$)/', '{varA: "value, A", varB: "value:B", varC: "value C", varD: "value\"D\""}', $matches); foreach($matches[1] as $key => $match) { $arr[] = $match . ' :"' . $matches[2][$key] . '"'; } print_r($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/0nJqW
function name:  (null)
number of ops:  22
compiled vars:  !0 = $matches, !1 = $match, !2 = $key, !3 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'preg_match_all'
          1        SEND_VAL                                                 '%2F%5C%7B%3F%28.%2A%3F%29%3A%5Ch%2A%5C%22%28.%2A%3F%29%5C%22%28%3F%3A%2C%7C%5C%7D%7C%24%29%2F'
          2        SEND_VAL                                                 '%7BvarA%3A+%22value%2C+A%22%2C+varB%3A+%22value%3AB%22%2C+varC%3A+%22value+C%22%2C+varD%3A+%22value%5C%22D%5C%22%22%7D'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                                 
    3     5        FETCH_DIM_R                                      ~5      !0, 1
          6      > FE_RESET_R                                       $6      ~5, ->17
          7    > > FE_FETCH_R                                       ~7      $6, !1, ->17
          8    >   ASSIGN                                                   !2, ~7
    4     9        CONCAT                                           ~10     !1, '+%3A%22'
         10        FETCH_DIM_R                                      ~11     !0, 2
         11        FETCH_DIM_R                                      ~12     ~11, !2
         12        CONCAT                                           ~13     ~10, ~12
         13        CONCAT                                           ~14     ~13, '%22'
         14        ASSIGN_DIM                                               !3
         15        OP_DATA                                                  ~14
    3    16      > JMP                                                      ->7
         17    >   FE_FREE                                                  $6
    6    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.18 ms | 1011 KiB | 15 Q