3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.81 ms | 1400 KiB | 23 Q