3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "id,zip,state,city,county,territory,price" => "1,90001,CA,Los Angeles,Los Angeles,Orange CA,40" ]; $key = key($array); var_export( array_combine( explode(',', $key), explode(',', $array[$key]) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dbRvb
function name:  (null)
number of ops:  22
compiled vars:  !0 = $array, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'key'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    8     5        INIT_FCALL                                               'var_export'
    9     6        INIT_FCALL                                               'array_combine'
   10     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '%2C'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
   11    12        INIT_FCALL                                               'explode'
         13        SEND_VAL                                                 '%2C'
         14        FETCH_DIM_R                                      ~6      !0, !1
         15        SEND_VAL                                                 ~6
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
    9    18        DO_ICALL                                         $8      
   11    19        SEND_VAR                                                 $8
    8    20        DO_ICALL                                                 
   13    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.02 ms | 1002 KiB | 17 Q