3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ "Armstrong_Tony" => 7, "Blair_Jarryd" => 7, "Broomhead_Tim" => 11 ], [ "Armstrong_Tony" => 19, "Ball_Luke" => 20, "Blair_Jarryd" => 20, "Broomhead_Tim" => 23 ], [ "Ball_Luke" => 20, "Beams_Dayne" => 14, "Blair_Jarryd" => 19, "Frost_Jack" => 8, "Goldsack_Tyson" => 7 ] ]; var_export( array_map( function($data) { $data = (array) $data; return array_sum($data) / count($data); }, array_merge_recursive(...$array) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OMT2e
function name:  (null)
number of ops:  14
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   24     1        INIT_FCALL                                               'var_export'
   25     2        INIT_FCALL                                               'array_map'
   26     3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   29     4        SEND_VAL                                                 ~2
   30     5        INIT_FCALL                                               'array_merge_recursive'
          6        SEND_UNPACK                                              !0
          7        CHECK_UNDEF_ARGS                                         
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
   25    10        DO_ICALL                                         $4      
   30    11        SEND_VAR                                                 $4
   24    12        DO_ICALL                                                 
   32    13      > 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/OMT2e
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   27     1        CAST                                          7  ~1      !0
          2        ASSIGN                                                   !0, ~1
   28     3        INIT_FCALL                                               'array_sum'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        COUNT                                            ~4      !0
          7        DIV                                              ~5      $3, ~4
          8      > RETURN                                                   ~5
   29     9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.37 ms | 1005 KiB | 17 Q