3v4l.org

run code in 500+ PHP versions simultaneously
<?php $n = 5; $number = 1; for ($i = 0; $i < $n; $i++) { $actuallyList= array(); $numbers = array(); for ($j = 0; $j <= $i; $j++) { $numbers[$j] = $number; $number += 2; } $actuallyList += [$i=> $numbers]; } $sum = array_sum($numbers); print_r($numbers);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 8
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
Branch analysis from position: 4
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 8
Branch analysis from position: 14
Branch analysis from position: 8
filename:       /in/I8aNh
function name:  (null)
number of ops:  27
compiled vars:  !0 = $n, !1 = $number, !2 = $i, !3 = $actuallyList, !4 = $numbers, !5 = $j, !6 = $sum
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 5
    3     1        ASSIGN                                                       !1, 1
    6     2        ASSIGN                                                       !2, 0
          3      > JMP                                                          ->17
    7     4    >   ASSIGN                                                       !3, <array>
    8     5        ASSIGN                                                       !4, <array>
    9     6        ASSIGN                                                       !5, 0
          7      > JMP                                                          ->12
   10     8    >   ASSIGN_DIM                                                   !4, !5
          9        OP_DATA                                                      !1
   11    10        ASSIGN_OP                                         1          !1, 2
    9    11        PRE_INC                                                      !5
         12    >   IS_SMALLER_OR_EQUAL                                          !5, !2
         13      > JMPNZ                                                        ~16, ->8
   13    14    >   INIT_ARRAY                                           ~17     !4, !2
         15        ASSIGN_OP                                         1          !3, ~17
    6    16        PRE_INC                                                      !2
         17    >   IS_SMALLER                                                   !2, !0
         18      > JMPNZ                                                        ~20, ->4
   15    19    >   INIT_FCALL                                                   'array_sum'
         20        SEND_VAR                                                     !4
         21        DO_ICALL                                             $21     
         22        ASSIGN                                                       !6, $21
   19    23        INIT_FCALL                                                   'print_r'
         24        SEND_VAR                                                     !4
         25        DO_ICALL                                                     
         26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.73 ms | 1317 KiB | 15 Q