3v4l.org

run code in 500+ PHP versions simultaneously
<?php $source = array ( 'width_id' => array ( 0 => '8', 1 => '24' ), 'profile_id' => array ( 0 => '8', 1 => '13' ), 'diameter_id' => array ( 0 => '4', 1 => '13' ), 'speed_id' => array ( 0 => '6', 1 => '13' ), 'load_id' => array ( 0 => '12', 1 => '31' ) ); $result = []; array_walk($source, function($v,$k) use (&$result){ $result[0][$k] = $v[0]; $result[1][$k] = $v[1]; }); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9H9V0
function name:  (null)
number of ops:  12
compiled vars:  !0 = $source, !1 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   31     1        ASSIGN                                                       !1, <array>
   32     2        INIT_FCALL                                                   'array_walk'
          3        SEND_REF                                                     !0
          4        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          5        BIND_LEXICAL                                                 ~4, !1
   35     6        SEND_VAL                                                     ~4
   32     7        DO_ICALL                                                     
   37     8        INIT_FCALL                                                   'print_r'
          9        SEND_VAR                                                     !1
         10        DO_ICALL                                                     
         11      > 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/9H9V0
function name:  {closure:/in/9H9V0:32}
number of ops:  12
compiled vars:  !0 = $v, !1 = $k, !2 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   32     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        BIND_STATIC                                                  !2
   33     3        FETCH_DIM_R                                          ~5      !0, 0
          4        FETCH_DIM_W                                          $3      !2, 0
          5        ASSIGN_DIM                                                   $3, !1
          6        OP_DATA                                                      ~5
   34     7        FETCH_DIM_R                                          ~8      !0, 1
          8        FETCH_DIM_W                                          $6      !2, 1
          9        ASSIGN_DIM                                                   $6, !1
         10        OP_DATA                                                      ~8
   35    11      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.49 ms | 2850 KiB | 14 Q