3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_2 = []; for($i=1;$i<=1000;++$i){ $temp = []; for($j=1;$j<=1000;++$j){ $temp[] = rand(1,100); } $array_2[] = $temp; } $sum = array_reduce($array_2,function($sum,$value){ $sum += array_sum($value); return $sum; }); echo $sum;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 3
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 3
Branch analysis from position: 20
Branch analysis from position: 3
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/33SCL
function name:  (null)
number of ops:  28
compiled vars:  !0 = $array_2, !1 = $i, !2 = $temp, !3 = $j, !4 = $sum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->18
    6     3    >   ASSIGN                                                   !2, <array>
    7     4        ASSIGN                                                   !3, 1
          5      > JMP                                                      ->13
    8     6    >   INIT_FCALL                                               'rand'
          7        SEND_VAL                                                 1
          8        SEND_VAL                                                 100
          9        DO_ICALL                                         $10     
         10        ASSIGN_DIM                                               !2
         11        OP_DATA                                                  $10
    7    12        PRE_INC                                                  !3
         13    >   IS_SMALLER_OR_EQUAL                                      !3, 1000
         14      > JMPNZ                                                    ~12, ->6
   10    15    >   ASSIGN_DIM                                               !0
         16        OP_DATA                                                  !2
    5    17        PRE_INC                                                  !1
         18    >   IS_SMALLER_OR_EQUAL                                      !1, 1000
         19      > JMPNZ                                                    ~15, ->3
   14    20    >   INIT_FCALL                                               'array_reduce'
         21        SEND_VAR                                                 !0
         22        DECLARE_LAMBDA_FUNCTION                          ~16     [0]
   17    23        SEND_VAL                                                 ~16
   14    24        DO_ICALL                                         $17     
         25        ASSIGN                                                   !4, $17
   19    26        ECHO                                                     !4
   20    27      > 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/33SCL
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $sum, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        INIT_FCALL                                               'array_sum'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $2      
          5        ASSIGN_OP                                     1          !0, $2
   16     6      > RETURN                                                   !0
   17     7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.53 ms | 1017 KiB | 16 Q