3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variavel = array(); $variavel[0][0] = 12; $variavel[0][6] = 5; $variavel[0][6] = 5; $variavel[9][6] = 10; $soma = array_reduce($variavel, function($carry, $item){ $carry = $carry + $item[6]; return $carry; }); echo $soma;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PWGgs
function name:  (null)
number of ops:  21
compiled vars:  !0 = $variavel, !1 = $soma
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        FETCH_DIM_W                                      $3      !0, 0
          2        ASSIGN_DIM                                               $3, 0
          3        OP_DATA                                                  12
    4     4        FETCH_DIM_W                                      $5      !0, 0
          5        ASSIGN_DIM                                               $5, 6
          6        OP_DATA                                                  5
    5     7        FETCH_DIM_W                                      $7      !0, 0
          8        ASSIGN_DIM                                               $7, 6
          9        OP_DATA                                                  5
    6    10        FETCH_DIM_W                                      $9      !0, 9
         11        ASSIGN_DIM                                               $9, 6
         12        OP_DATA                                                  10
    7    13        INIT_FCALL                                               'array_reduce'
         14        SEND_VAR                                                 !0
         15        DECLARE_LAMBDA_FUNCTION                          ~11     [0]
   10    16        SEND_VAL                                                 ~11
    7    17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !1, $12
   12    19        ECHO                                                     !1
         20      > 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/PWGgs
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $carry, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        FETCH_DIM_R                                      ~2      !1, 6
          3        ADD                                              ~3      !0, ~2
          4        ASSIGN                                                   !0, ~3
    9     5      > RETURN                                                   !0
   10     6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.58 ms | 1016 KiB | 14 Q