3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = 100; $end = 200; $step = 10; echo array_sum(range($start, $end, $step)); echo "\n---\n"; $factors = [2, 5]; $total = 0; for ($i = $start; $i <= $end; ++$i) { foreach ($factors as $f) { if ($i % $f !== 0) { continue 2; } } $total += $i; } echo $total;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 17
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 17
Branch analysis from position: 30
Branch analysis from position: 17
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 17
Branch analysis from position: 30
Branch analysis from position: 17
Branch analysis from position: 25
filename:       /in/mMDuM
function name:  (null)
number of ops:  32
compiled vars:  !0 = $start, !1 = $end, !2 = $step, !3 = $factors, !4 = $total, !5 = $i, !6 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 100
    4     1        ASSIGN                                                   !1, 200
    5     2        ASSIGN                                                   !2, 10
    7     3        INIT_FCALL                                               'array_sum'
          4        INIT_FCALL                                               'range'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $10     
          9        SEND_VAR                                                 $10
         10        DO_ICALL                                         $11     
         11        ECHO                                                     $11
    9    12        ECHO                                                     '%0A---%0A'
   11    13        ASSIGN                                                   !3, <array>
   12    14        ASSIGN                                                   !4, 0
   13    15        ASSIGN                                                   !5, !0
         16      > JMP                                                      ->28
   14    17    > > FE_RESET_R                                       $15     !3, ->25
         18    > > FE_FETCH_R                                               $15, !6, ->25
   15    19    >   MOD                                              ~16     !5, !6
         20        IS_NOT_IDENTICAL                                         ~16, 0
         21      > JMPZ                                                     ~17, ->24
   16    22    >   FE_FREE                                                  $15
         23      > JMP                                                      ->27
   14    24    > > JMP                                                      ->18
         25    >   FE_FREE                                                  $15
   19    26        ASSIGN_OP                                     1          !4, !5
   13    27    >   PRE_INC                                                  !5
         28    >   IS_SMALLER_OR_EQUAL                                      !5, !1
         29      > JMPNZ                                                    ~20, ->17
   21    30    >   ECHO                                                     !4
   22    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
194.39 ms | 1012 KiB | 15 Q