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)); echo date("d", $DayDiff); /* $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/Cieff
function name:  (null)
number of ops:  34
compiled vars:  !0 = $startDate, !1 = $AdExpirationDate, !2 = $today, !3 = $DayDiff
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                                         $4      
          3        ASSIGN                                                   !0, $4
    6     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'F+d%2C+Y'
          6        INIT_FCALL                                               'strtotime'
          7        CONCAT                                           ~6      !0, '%2B120+days'
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                         $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !1, $8
    9    13        INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'F+d%2C+Y'
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !2, $10
   10    17        INIT_FCALL                                               'abs'
         18        INIT_FCALL                                               'strtotime'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $12     
         21        INIT_FCALL                                               'strtotime'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $13     
         24        SUB                                              ~14     $12, $13
         25        SEND_VAL                                                 ~14
         26        DO_ICALL                                         $15     
         27        ASSIGN                                                   !3, $15
   12    28        INIT_FCALL                                               'date'
         29        SEND_VAL                                                 'd'
         30        SEND_VAR                                                 !3
         31        DO_ICALL                                         $17     
         32        ECHO                                                     $17
   25    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.8 ms | 1396 KiB | 19 Q