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 . '+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)); echo floor($DayDiff / DAY); /* $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 $DayDiff; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FXs4J
function name:  (null)
number of ops:  40
compiled vars:  !0 = $startDate, !1 = $AdExpirationDate, !2 = $today, !3 = $DayDiff
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                                         $5      
          8        ASSIGN                                                   !0, $5
    8     9        INIT_FCALL                                               'date'
         10        SEND_VAL                                                 'F+d%2C+Y'
         11        INIT_FCALL                                               'strtotime'
         12        CONCAT                                           ~7      !0, '%2B120+days'
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                         $8      
         15        SEND_VAR                                                 $8
         16        DO_ICALL                                         $9      
         17        ASSIGN                                                   !1, $9
   11    18        INIT_FCALL                                               'date'
         19        SEND_VAL                                                 'F+d%2C+Y'
         20        DO_ICALL                                         $11     
         21        ASSIGN                                                   !2, $11
   12    22        INIT_FCALL                                               'abs'
         23        INIT_FCALL                                               'strtotime'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $13     
         26        INIT_FCALL                                               'strtotime'
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                         $14     
         29        SUB                                              ~15     $13, $14
         30        SEND_VAL                                                 ~15
         31        DO_ICALL                                         $16     
         32        ASSIGN                                                   !3, $16
   14    33        INIT_FCALL                                               'floor'
         34        FETCH_CONSTANT                                   ~18     'DAY'
         35        DIV                                              ~19     !3, ~18
         36        SEND_VAL                                                 ~19
         37        DO_ICALL                                         $20     
         38        ECHO                                                     $20
   27    39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.07 ms | 1396 KiB | 23 Q