3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 1 => [ 'A' => ['AA' => 3, 'AB' => 5], 'B' => ['BA' => 2] ], 2 => [ 'C' => ['CA' => 4], 'D' => ['DA' => 1, 'DB' => 2] ], 3 => [ 'E' => ['EA' => 1, 'EB' => 2, 'EC' => 3], 'F' => ['FA' => 0, 'FB' => 7, 'FC' => 7] ] ]; var_export( array_map( fn($set) => array_sum( array_map(array_sum(...), $set) ), $array ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QnuhP
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   19     1        INIT_FCALL                                                   'var_export'
   20     2        INIT_FCALL                                                   'array_map'
   21     3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   23     4        SEND_VAL                                                     ~2
   24     5        SEND_VAR                                                     !0
   20     6        DO_ICALL                                             $3      
   24     7        SEND_VAR                                                     $3
   19     8        DO_ICALL                                                     
   26     9      > 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/QnuhP
function name:  {closure:/in/QnuhP:21}
number of ops:  12
compiled vars:  !0 = $set
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   RECV                                                 !0      
          1        INIT_FCALL                                                   'array_sum'
   22     2        INIT_FCALL                                                   'array_map'
          3        INIT_FCALL                                                   'array_sum'
          4        CALLABLE_CONVERT                                     ~1      
          5        SEND_VAL                                                     ~1
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $2      
          8        SEND_VAR                                                     $2
   21     9        DO_ICALL                                             $3      
   22    10      > RETURN                                                       $3
   23    11*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.99 ms | 1489 KiB | 16 Q