3v4l.org

run code in 300+ PHP versions simultaneously
<?php $exploded = explode(",", "0=0,1=1,2=2,3=3"); print_r($exploded); $new_array = array(); array_walk($exploded,function($val,$key)use(&$new_array){ $att=explode("=",$val); $new_array[$att[0]]=$att[1]; }); var_dump($new_array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kRYD7
function name:  (null)
number of ops:  19
compiled vars:  !0 = $exploded, !1 = $new_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '%2C'
          2        SEND_VAL                                                 '0%3D0%2C1%3D1%2C2%3D2%2C3%3D3'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    6     8        ASSIGN                                                   !1, <array>
    7     9        INIT_FCALL                                               'array_walk'
         10        SEND_REF                                                 !0
         11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkRYD7%3A7%240'
         12        BIND_LEXICAL                                             ~6, !1
   10    13        SEND_VAL                                                 ~6
         14        DO_ICALL                                                 
   12    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FkRYD7%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kRYD7
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $val, !1 = $key, !2 = $new_array, !3 = $att
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
    8     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%3D'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !3, $4
    9     8        FETCH_DIM_R                                      ~6      !3, 0
          9        FETCH_DIM_R                                      ~8      !3, 1
         10        ASSIGN_DIM                                               !2, ~6
         11        OP_DATA                                                  ~8
   10    12      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkRYD7%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.31 ms | 1396 KiB | 21 Q