3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start_date = "2019-07-29"; $end_date = "2019-07-31"; $date_now = date('Y-m-d'); if((strtotime($date_now) >= strtotime($start_date)) && (strtotime($date_now) <= strtotime($end_date))){ echo "promo active!"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 22
filename:       /in/cX5ed
function name:  (null)
number of ops:  25
compiled vars:  !0 = $start_date, !1 = $end_date, !2 = $date_now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2019-07-29'
    4     1        ASSIGN                                                   !1, '2019-07-31'
    6     2        INIT_FCALL                                               'date'
          3        SEND_VAL                                                 'Y-m-d'
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !2, $5
    8     6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $7      
          9        INIT_FCALL                                               'strtotime'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $8      
         12        IS_SMALLER_OR_EQUAL                              ~9      $8, $7
         13      > JMPZ_EX                                          ~9      ~9, ->22
         14    >   INIT_FCALL                                               'strtotime'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $10     
         17        INIT_FCALL                                               'strtotime'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $11     
         20        IS_SMALLER_OR_EQUAL                              ~12     $10, $11
         21        BOOL                                             ~9      ~12
         22    > > JMPZ                                                     ~9, ->24
    9    23    >   ECHO                                                     'promo+active%21'
   10    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.65 ms | 1006 KiB | 15 Q