3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startYear = 2014; $lastTaken = 2016; $recurrenceYears = 3; $nextRequirement = $startYear + ($lastTaken + ($lastTaken % $recurrenceYears) - $startYear); var_dump($nextRequirement);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GAhcf
function name:  (null)
number of ops:  12
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, 2016
    5     2        ASSIGN                                                   !2, 3
    7     3        MOD                                              ~7      !1, !2
          4        ADD                                              ~8      !1, ~7
          5        SUB                                              ~9      ~8, !0
          6        ADD                                              ~10     !0, ~9
          7        ASSIGN                                                   !3, ~10
    9     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.95 ms | 1394 KiB | 15 Q