3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startDate = date('F d, Y'); $AdExpirationDate = date("F d, Y",strtotime($startDate . '+120 days')); //Calculate the difference between expiration date and today to see if it expires within 30 days $today = date("F d, Y"); $DayDiff = abs(strtotime($AdExpirationDate) - strtotime($today)); $DaysToExpiration = floor(($DayDiff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); if ($DaysToExpiration <= 30) { $Expire30 = True; }else{ $Expire30 = False; } echo $Expire30; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tmvt8
function name:  (null)
number of ops:  50
compiled vars:  !0 = $startDate, !1 = $AdExpirationDate, !2 = $today, !3 = $DayDiff, !4 = $DaysToExpiration, !5 = $years, !6 = $months, !7 = $Expire30
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'F+d%2C+Y'
          2        DO_ICALL                                         $8      
          3        ASSIGN                                                   !0, $8
    6     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'F+d%2C+Y'
          6        INIT_FCALL                                               'strtotime'
          7        CONCAT                                           ~10     !0, '%2B120+days'
          8        SEND_VAL                                                 ~10
          9        DO_ICALL                                         $11     
         10        SEND_VAR                                                 $11
         11        DO_ICALL                                         $12     
         12        ASSIGN                                                   !1, $12
    9    13        INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'F+d%2C+Y'
         15        DO_ICALL                                         $14     
         16        ASSIGN                                                   !2, $14
   10    17        INIT_FCALL                                               'abs'
         18        INIT_FCALL                                               'strtotime'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $16     
         21        INIT_FCALL                                               'strtotime'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $17     
         24        SUB                                              ~18     $16, $17
         25        SEND_VAL                                                 ~18
         26        DO_ICALL                                         $19     
         27        ASSIGN                                                   !3, $19
   12    28        INIT_FCALL                                               'floor'
         29        MUL                                              ~21     !5, 365
         30        MUL                                              ~22     ~21, 60
         31        MUL                                              ~23     ~22, 60
         32        MUL                                              ~24     ~23, 24
         33        SUB                                              ~25     !3, ~24
         34        MUL                                              ~26     !6, 30
         35        MUL                                              ~27     ~26, 60
         36        MUL                                              ~28     ~27, 60
         37        MUL                                              ~29     ~28, 24
         38        SUB                                              ~30     ~25, ~29
         39        DIV                                              ~31     ~30, 86400
         40        SEND_VAL                                                 ~31
         41        DO_ICALL                                         $32     
         42        ASSIGN                                                   !4, $32
   13    43        IS_SMALLER_OR_EQUAL                                      !4, 30
         44      > JMPZ                                                     ~34, ->47
   14    45    >   ASSIGN                                                   !7, <true>
         46      > JMP                                                      ->48
   16    47    >   ASSIGN                                                   !7, <false>
   19    48    >   ECHO                                                     !7
   21    49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.64 ms | 1405 KiB | 21 Q