3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => "Column 1, Column 2 ,Column 3,Column 4,Column 5,Column 6", 1 => "19506,7254,321878,8,1,60", 2 => "187486,685,377,3,0,0", 3 => "187498,682285,3354,45,1,400", 4 => "18498,681285,38959,2,0,0", ]; $keys = explode(",", str_replace(" ","",$arr[0])); array_shift($arr); $arr = array_map(function($a) use($keys){ return array_combine($keys, explode(",",$a)); }, $arr); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cp2s7
function name:  (null)
number of ops:  26
compiled vars:  !0 = $arr, !1 = $keys
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        INIT_FCALL                                               'str_replace'
          4        SEND_VAL                                                 '+'
          5        SEND_VAL                                                 ''
          6        FETCH_DIM_R                                      ~3      !0, 0
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                         $5      
         11        ASSIGN                                                   !1, $5
   12    12        INIT_FCALL                                               'array_shift'
         13        SEND_REF                                                 !0
         14        DO_ICALL                                                 
   13    15        INIT_FCALL                                               'array_map'
         16        DECLARE_LAMBDA_FUNCTION                          ~8      [0]
         17        BIND_LEXICAL                                             ~8, !1
   15    18        SEND_VAL                                                 ~8
         19        SEND_VAR                                                 !0
   13    20        DO_ICALL                                         $9      
         21        ASSIGN                                                   !0, $9
   16    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                                 
         25      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cp2s7
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $a, !1 = $keys
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   14     2        INIT_FCALL                                               'array_combine'
          3        SEND_VAR                                                 !1
          4        INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '%2C'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10      > RETURN                                                   $3
   15    11*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.94 ms | 1006 KiB | 19 Q