3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ '2019-09-28' => [ 'A' => 4, 'B' => 85, 'C' => 200 ], '2019-09-29' => [ 'A' => 5, 'B' => 83, 'C' =>202 ] ]; array_walk($a, function($v,$k) use (&$r){ array_walk($v,function($v1,$k1) use (&$r,$k){ $r[$k1][$k] = $v1; }); }); print_r($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/An23C
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          4        BIND_LEXICAL                                             ~3, !1
   18     5        SEND_VAL                                                 ~3
   14     6        DO_ICALL                                                 
   20     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > 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/An23C
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $v, !1 = $k, !2 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   15     3        INIT_FCALL                                               'array_walk'
          4        SEND_REF                                                 !0
          5        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          6        BIND_LEXICAL                                             ~3, !2
          7        BIND_LEXICAL                                             ~3, !1
   17     8        SEND_VAL                                                 ~3
   15     9        DO_ICALL                                                 
   18    10      > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/An23C
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v1, !1 = $k1, !2 = $r, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
   16     4        FETCH_DIM_W                                      $4      !2, !1
          5        ASSIGN_DIM                                               $4, !3
          6        OP_DATA                                                  !0
   17     7      > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.44 ms | 1000 KiB | 15 Q