3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startYear = 2014; $lastTaken = 2015; $recurrenceYears = 3; $nextRequirement = $lastTaken + ($recurrenceYears - (($lastTaken - $startYear) % $recurrenceYears)); var_dump($lastTaken - $startYear); var_dump($nextRequirement);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BQTGn
function name:  (null)
number of ops:  16
compiled vars:  !0 = $startYear, !1 = $lastTaken, !2 = $recurrenceYears, !3 = $nextRequirement
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2014
    4     1        ASSIGN                                                   !1, 2015
    5     2        ASSIGN                                                   !2, 3
    7     3        SUB                                              ~7      !1, !0
          4        MOD                                              ~8      ~7, !2
          5        SUB                                              ~9      !2, ~8
          6        ADD                                              ~10     !1, ~9
          7        ASSIGN                                                   !3, ~10
    8     8        INIT_FCALL                                               'var_dump'
          9        SUB                                              ~12     !1, !0
         10        SEND_VAL                                                 ~12
         11        DO_ICALL                                                 
    9    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !3
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.9 ms | 1394 KiB | 15 Q