3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startYear = 2014; $modYear = 3; $currentYear = 2021; $nextYear = $currentYear + ($modYear - (($currentYear - $startYear) % $modYear)); echo $nextYear;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kMIaV
function name:  (null)
number of ops:  10
compiled vars:  !0 = $startYear, !1 = $modYear, !2 = $currentYear, !3 = $nextYear
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2014
    4     1        ASSIGN                                                   !1, 3
    5     2        ASSIGN                                                   !2, 2021
    7     3        SUB                                              ~7      !2, !0
          4        MOD                                              ~8      ~7, !1
          5        SUB                                              ~9      !1, ~8
          6        ADD                                              ~10     !2, ~9
          7        ASSIGN                                                   !3, ~10
    9     8        ECHO                                                     !3
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.33 ms | 1392 KiB | 13 Q