3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "list" => [ [ "id" => 1, "card_id" => 6, "amount" => 400, ], [ "id" => 2, "card_id" => 3, "amount" => 500, ] ] ]; echo array_sum(array_column($array["list"], 'amount'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EsvJO
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   20     1        INIT_FCALL                                               'array_sum'
          2        INIT_FCALL                                               'array_column'
          3        FETCH_DIM_R                                      ~2      !0, 'list'
          4        SEND_VAL                                                 ~2
          5        SEND_VAL                                                 'amount'
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ECHO                                                     $4
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.48 ms | 1000 KiB | 15 Q