3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [[58 => 32]], [[58 => 34]], [[57 => 26]], [[57 => 27]], [[56 => 16]], [[56 => 17]] ]; array_walk_recursive($arr, function($v,$k) use (&$r){ $r[$k] = isset($r[$k]) ? ($r[$k]+$v) : $v; }); print_r($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MMDEv
function name:  (null)
number of ops:  11
compiled vars:  !0 = $arr, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'array_walk_recursive'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          4        BIND_LEXICAL                                             ~3, !1
   14     5        SEND_VAL                                                 ~3
   12     6        DO_ICALL                                                 
   15     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
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MMDEv
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $v, !1 = $k, !2 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   13     3        ISSET_ISEMPTY_DIM_OBJ                         0          !2, !1
          4      > JMPZ                                                     ~4, ->9
          5    >   FETCH_DIM_R                                      ~5      !2, !1
          6        ADD                                              ~6      ~5, !0
          7        QM_ASSIGN                                        ~7      ~6
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~7      !0
         10    >   ASSIGN_DIM                                               !2, !1
         11        OP_DATA                                                  ~7
   14    12      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.64 ms | 1460 KiB | 15 Q