3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array_fill(0, 14, ['amount_paid' => 2050.00]); var_export( array_map( fn($set) => array_sum(array_column($set, 'amount_paid')), array_chunk($array, 10) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G7AcJ
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'array_fill'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 14
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $1      
          5        ASSIGN                                                   !0, $1
    5     6        INIT_FCALL                                               'var_export'
    6     7        INIT_FCALL                                               'array_map'
    7     8        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          9        SEND_VAL                                                 ~3
    8    10        INIT_FCALL                                               'array_chunk'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 10
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
    6    15        DO_ICALL                                         $5      
    8    16        SEND_VAR                                                 $5
    5    17        DO_ICALL                                                 
   10    18      > 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/G7AcJ
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $set
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'array_sum'
          2        INIT_FCALL                                               'array_column'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'amount_paid'
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                         $2      
          8      > RETURN                                                   $2
          9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
262.11 ms | 1017 KiB | 19 Q