3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [1, 2, 3], [4, 5, 6], [7, 8, 9], ]; $sum = 0; $av = 0; for($i = 0 ; $i <= count($arr); $i++){ for ($j = 0; $j <= count($arr[$i]); $j++){ $sum += $arr[$i][$j]; $av = count($arr[$i][$j]); } } echo $arr[$i][$j], PHP_EOL; echo 'Сборът на масива е: ' . $sum . PHP_EOL . 'Средноаритметичната стойност е: ' . ($sum / $av);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 5
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 7
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 5
Branch analysis from position: 23
Branch analysis from position: 5
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 7
Branch analysis from position: 19
Branch analysis from position: 7
filename:       /in/UJLlq
function name:  (null)
number of ops:  34
compiled vars:  !0 = $arr, !1 = $sum, !2 = $av, !3 = $i, !4 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, 0
   11     2        ASSIGN                                                   !2, 0
   12     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->20
   13     5    >   ASSIGN                                                   !4, 0
          6      > JMP                                                      ->15
   14     7    >   FETCH_DIM_R                                      ~10     !0, !3
          8        FETCH_DIM_R                                      ~11     ~10, !4
          9        ASSIGN_OP                                     1          !1, ~11
   15    10        FETCH_DIM_R                                      ~13     !0, !3
         11        FETCH_DIM_R                                      ~14     ~13, !4
         12        COUNT                                            ~15     ~14
         13        ASSIGN                                                   !2, ~15
   13    14        PRE_INC                                                  !4
         15    >   FETCH_DIM_R                                      ~18     !0, !3
         16        COUNT                                            ~19     ~18
         17        IS_SMALLER_OR_EQUAL                                      !4, ~19
         18      > JMPNZ                                                    ~20, ->7
   12    19    >   PRE_INC                                                  !3
         20    >   COUNT                                            ~22     !0
         21        IS_SMALLER_OR_EQUAL                                      !3, ~22
         22      > JMPNZ                                                    ~23, ->5
   19    23    >   FETCH_DIM_R                                      ~24     !0, !3
         24        FETCH_DIM_R                                      ~25     ~24, !4
         25        ECHO                                                     ~25
         26        ECHO                                                     '%0A'
   20    27        CONCAT                                           ~26     '%D0%A1%D0%B1%D0%BE%D1%80%D1%8A%D1%82+%D0%BD%D0%B0+%D0%BC%D0%B0%D1%81%D0%B8%D0%B2%D0%B0+%D0%B5%3A+', !1
         28        CONCAT                                           ~27     ~26, '%0A'
         29        CONCAT                                           ~28     ~27, '%D0%A1%D1%80%D0%B5%D0%B4%D0%BD%D0%BE%D0%B0%D1%80%D0%B8%D1%82%D0%BC%D0%B5%D1%82%D0%B8%D1%87%D0%BD%D0%B0%D1%82%D0%B0+%D1%81%D1%82%D0%BE%D0%B9%D0%BD%D0%BE%D1%81%D1%82+%D0%B5%3A+'
         30        DIV                                              ~29     !1, !2
         31        CONCAT                                           ~30     ~28, ~29
         32        ECHO                                                     ~30
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.26 ms | 1399 KiB | 13 Q