3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'id:5918351498722606 sub:001 dlvrd:001 submit date:1410311037 done date:1410311038 stat:DELIVRD err:000 text:New HTTP Test TxtN'; preg_match_all('/(?:^|\s+)([^:]+):([^:]+$|[^\s]+)/', $string, $matches); $output = array_combine($matches[1], $matches[2]); print_r($output);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z7bsI
function name:  (null)
number of ops:  17
compiled vars:  !0 = $string, !1 = $matches, !2 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'id%3A5918351498722606+sub%3A001+dlvrd%3A001+submit+date%3A1410311037+done+date%3A1410311038+%0Astat%3ADELIVRD+err%3A000+text%3ANew+HTTP+Test+TxtN'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28%3F%3A%5E%7C%5Cs%2B%29%28%5B%5E%3A%5D%2B%29%3A%28%5B%5E%3A%5D%2B%24%7C%5B%5E%5Cs%5D%2B%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'array_combine'
          7        FETCH_DIM_R                                      ~5      !1, 1
          8        SEND_VAL                                                 ~5
          9        FETCH_DIM_R                                      ~6      !1, 2
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
    6    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.21 ms | 1001 KiB | 16 Q