3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startYear = 2014; $currentYear = 2017; $modYear = 3; $nextYear = $currentYear; for($i = $currentYear; $i <= $currentYear+$modYear; $i++) { if($i % $startYear % $currentYear == 0) { $nextYear = $i; break; } } echo $nextYear;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
filename:       /in/C1Goq
function name:  (null)
number of ops:  18
compiled vars:  !0 = $startYear, !1 = $currentYear, !2 = $modYear, !3 = $nextYear, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2014
    4     1        ASSIGN                                                   !1, 2017
    5     2        ASSIGN                                                   !2, 3
    7     3        ASSIGN                                                   !3, !1
    8     4        ASSIGN                                                   !4, !1
          5      > JMP                                                      ->13
    9     6    >   MOD                                              ~10     !4, !0
          7        MOD                                              ~11     ~10, !1
          8        IS_EQUAL                                                 ~11, 0
          9      > JMPZ                                                     ~12, ->12
   10    10    >   ASSIGN                                                   !3, !4
   11    11      > JMP                                                      ->16
    8    12    >   PRE_INC                                                  !4
         13    >   ADD                                              ~15     !1, !2
         14        IS_SMALLER_OR_EQUAL                                      !4, ~15
         15      > JMPNZ                                                    ~16, ->6
   15    16    >   ECHO                                                     !3
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.97 ms | 1394 KiB | 13 Q