3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(14,23,264,654,4,34,34); $sum = array_reduce( $array, function($carry, $current) { return $carry += $current; }, 0 ); var_dump($sum);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t2ZRh
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $sum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_reduce'
    6     2        SEND_VAR                                                 !0
    7     3        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
    9     4        SEND_VAL                                                 ~3
   10     5        SEND_VAL                                                 0
    5     6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
   13     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > 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/t2ZRh
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $carry, !1 = $current
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        ASSIGN_OP                                     1  ~2      !0, !1
          3      > RETURN                                                   ~2
    9     4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
218.38 ms | 1000 KiB | 15 Q