3v4l.org

run code in 300+ PHP versions simultaneously
<?php $currentDate = date('02/01/Y'); $end_jan = strtotime('01/31/14'); $end_feb = strtotime('02/28/14'); $end_mar = strtotime('03/31/14'); $end_apr = strtotime('04/30/14'); $end_may = strtotime('05/31/14'); $end_jun = strtotime('06/30/14'); $end_jul = strtotime('07/31/14'); $end_aug = strtotime('08/31/14'); $end_sep = strtotime('09/30/14'); $end_oct = strtotime('10/31/14'); $end_nov = strtotime('11/30/14'); $end_dec = strtotime('12/31/14'); $current = strtotime($currentDate); $timestamp = strtotime($currentDate); if($timestamp >= $current && $timestamp <= $end_jan) { echo "The date $currentDate is in January";} elseif($timestamp >= $current && $timestamp <= $end_feb) { echo "The date $currentDate is in February";} elseif($timestamp >= $current && $timestamp <= $end_mar) { echo "The date $currentDate is in March";} elseif($timestamp >= $current && $timestamp <= $end_apr) { echo "The date $currentDate is in April";} elseif($timestamp >= $current && $timestamp <= $end_may) { echo "The date $currentDate is in May";} elseif($timestamp >= $current && $timestamp <= $end_jun) { echo "The date $currentDate is in June";} elseif($timestamp >= $current && $timestamp <= $end_jul) { echo "The date $currentDate is in July";} elseif($timestamp >= $current && $timestamp <= $end_aug) { echo "The date $currentDate is in August";} elseif($timestamp >= $current && $timestamp <= $end_sep) { echo "The date $currentDate is in September";} elseif($timestamp >= $current && $timestamp <= $end_oct) { echo "The date $currentDate is in October";} elseif($timestamp >= $current && $timestamp <= $end_nov) { echo "The date $currentDate is in November";} elseif($timestamp >= $current && $timestamp <= $end_dec) { echo "The date $currentDate is in December";} else { echo "Something has gone wrong!"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 62, Position 2 = 64
Branch analysis from position: 62
2 jumps found. (Code = 43) Position 1 = 65, Position 2 = 70
Branch analysis from position: 65
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 70
2 jumps found. (Code = 46) Position 1 = 72, Position 2 = 74
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 75, Position 2 = 80
Branch analysis from position: 75
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 80
2 jumps found. (Code = 46) Position 1 = 82, Position 2 = 84
Branch analysis from position: 82
2 jumps found. (Code = 43) Position 1 = 85, Position 2 = 90
Branch analysis from position: 85
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 90
2 jumps found. (Code = 46) Position 1 = 92, Position 2 = 94
Branch analysis from position: 92
2 jumps found. (Code = 43) Position 1 = 95, Position 2 = 100
Branch analysis from position: 95
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 100
2 jumps found. (Code = 46) Position 1 = 102, Position 2 = 104
Branch analysis from position: 102
2 jumps found. (Code = 43) Position 1 = 105, Position 2 = 110
Branch analysis from position: 105
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 110
2 jumps found. (Code = 46) Position 1 = 112, Position 2 = 114
Branch analysis from position: 112
2 jumps found. (Code = 43) Position 1 = 115, Position 2 = 120
Branch analysis from position: 115
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 120
2 jumps found. (Code = 46) Position 1 = 122, Position 2 = 124
Branch analysis from position: 122
2 jumps found. (Code = 43) Position 1 = 125, Position 2 = 130
Branch analysis from position: 125
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 130
2 jumps found. (Code = 46) Position 1 = 132, Position 2 = 134
Branch analysis from position: 132
2 jumps found. (Code = 43) Position 1 = 135, Position 2 = 140
Branch analysis from position: 135
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 140
2 jumps found. (Code = 46) Position 1 = 142, Position 2 = 144
Branch analysis from position: 142
2 jumps found. (Code = 43) Position 1 = 145, Position 2 = 150
Branch analysis from position: 145
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 150
2 jumps found. (Code = 46) Position 1 = 152, Position 2 = 154
Branch analysis from position: 152
2 jumps found. (Code = 43) Position 1 = 155, Position 2 = 160
Branch analysis from position: 155
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 160
2 jumps found. (Code = 46) Position 1 = 162, Position 2 = 164
Branch analysis from position: 162
2 jumps found. (Code = 43) Position 1 = 165, Position 2 = 170
Branch analysis from position: 165
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 170
2 jumps found. (Code = 46) Position 1 = 172, Position 2 = 174
Branch analysis from position: 172
2 jumps found. (Code = 43) Position 1 = 175, Position 2 = 180
Branch analysis from position: 175
1 jumps found. (Code = 42) Position 1 = 181
Branch analysis from position: 181
Branch analysis from position: 180
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 174
Branch analysis from position: 164
Branch analysis from position: 154
Branch analysis from position: 144
Branch analysis from position: 134
Branch analysis from position: 124
Branch analysis from position: 114
Branch analysis from position: 104
Branch analysis from position: 94
Branch analysis from position: 84
Branch analysis from position: 74
Branch analysis from position: 64
filename:       /in/uLfEQ
function name:  (null)
number of ops:  182
compiled vars:  !0 = $currentDate, !1 = $end_jan, !2 = $end_feb, !3 = $end_mar, !4 = $end_apr, !5 = $end_may, !6 = $end_jun, !7 = $end_jul, !8 = $end_aug, !9 = $end_sep, !10 = $end_oct, !11 = $end_nov, !12 = $end_dec, !13 = $current, !14 = $timestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 '02%2F01%2FY'
          2        DO_ICALL                                         $15     
          3        ASSIGN                                                   !0, $15
    4     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '01%2F31%2F14'
          6        DO_ICALL                                         $17     
          7        ASSIGN                                                   !1, $17
    5     8        INIT_FCALL                                               'strtotime'
          9        SEND_VAL                                                 '02%2F28%2F14'
         10        DO_ICALL                                         $19     
         11        ASSIGN                                                   !2, $19
    6    12        INIT_FCALL                                               'strtotime'
         13        SEND_VAL                                                 '03%2F31%2F14'
         14        DO_ICALL                                         $21     
         15        ASSIGN                                                   !3, $21
    7    16        INIT_FCALL                                               'strtotime'
         17        SEND_VAL                                                 '04%2F30%2F14'
         18        DO_ICALL                                         $23     
         19        ASSIGN                                                   !4, $23
    8    20        INIT_FCALL                                               'strtotime'
         21        SEND_VAL                                                 '05%2F31%2F14'
         22        DO_ICALL                                         $25     
         23        ASSIGN                                                   !5, $25
    9    24        INIT_FCALL                                               'strtotime'
         25        SEND_VAL                                                 '06%2F30%2F14'
         26        DO_ICALL                                         $27     
         27        ASSIGN                                                   !6, $27
   10    28        INIT_FCALL                                               'strtotime'
         29        SEND_VAL                                                 '07%2F31%2F14'
         30        DO_ICALL                                         $29     
         31        ASSIGN                                                   !7, $29
   11    32        INIT_FCALL                                               'strtotime'
         33        SEND_VAL                                                 '08%2F31%2F14'
         34        DO_ICALL                                         $31     
         35        ASSIGN                                                   !8, $31
   12    36        INIT_FCALL                                               'strtotime'
         37        SEND_VAL                                                 '09%2F30%2F14'
         38        DO_ICALL                                         $33     
         39        ASSIGN                                                   !9, $33
   13    40        INIT_FCALL                                               'strtotime'
         41        SEND_VAL                                                 '10%2F31%2F14'
         42        DO_ICALL                                         $35     
         43        ASSIGN                                                   !10, $35
   14    44        INIT_FCALL                                               'strtotime'
         45        SEND_VAL                                                 '11%2F30%2F14'
         46        DO_ICALL                                         $37     
         47        ASSIGN                                                   !11, $37
   15    48        INIT_FCALL                                               'strtotime'
         49        SEND_VAL                                                 '12%2F31%2F14'
         50        DO_ICALL                                         $39     
         51        ASSIGN                                                   !12, $39
   17    52        INIT_FCALL                                               'strtotime'
         53        SEND_VAR                                                 !0
         54        DO_ICALL                                         $41     
         55        ASSIGN                                                   !13, $41
   18    56        INIT_FCALL                                               'strtotime'
         57        SEND_VAR                                                 !0
         58        DO_ICALL                                         $43     
         59        ASSIGN                                                   !14, $43
   19    60        IS_SMALLER_OR_EQUAL                              ~45     !13, !14
         61      > JMPZ_EX                                          ~45     ~45, ->64
         62    >   IS_SMALLER_OR_EQUAL                              ~46     !14, !1
         63        BOOL                                             ~45     ~46
         64    > > JMPZ                                                     ~45, ->70
   20    65    >   ROPE_INIT                                     3  ~48     'The+date+'
         66        ROPE_ADD                                      1  ~48     ~48, !0
         67        ROPE_END                                      2  ~47     ~48, '+is+in+January'
         68        ECHO                                                     ~47
         69      > JMP                                                      ->181
   21    70    >   IS_SMALLER_OR_EQUAL                              ~50     !13, !14
         71      > JMPZ_EX                                          ~50     ~50, ->74
         72    >   IS_SMALLER_OR_EQUAL                              ~51     !14, !2
         73        BOOL                                             ~50     ~51
         74    > > JMPZ                                                     ~50, ->80
   22    75    >   ROPE_INIT                                     3  ~53     'The+date+'
         76        ROPE_ADD                                      1  ~53     ~53, !0
         77        ROPE_END                                      2  ~52     ~53, '+is+in+February'
         78        ECHO                                                     ~52
         79      > JMP                                                      ->181
   23    80    >   IS_SMALLER_OR_EQUAL                              ~55     !13, !14
         81      > JMPZ_EX                                          ~55     ~55, ->84
         82    >   IS_SMALLER_OR_EQUAL                              ~56     !14, !3
         83        BOOL                                             ~55     ~56
         84    > > JMPZ                                                     ~55, ->90
   24    85    >   ROPE_INIT                                     3  ~58     'The+date+'
         86        ROPE_ADD                                      1  ~58     ~58, !0
         87        ROPE_END                                      2  ~57     ~58, '+is+in+March'
         88        ECHO                                                     ~57
         89      > JMP                                                      ->181
   25    90    >   IS_SMALLER_OR_EQUAL                              ~60     !13, !14
         91      > JMPZ_EX                                          ~60     ~60, ->94
         92    >   IS_SMALLER_OR_EQUAL                              ~61     !14, !4
         93        BOOL                                             ~60     ~61
         94    > > JMPZ                                                     ~60, ->100
   26    95    >   ROPE_INIT                                     3  ~63     'The+date+'
         96        ROPE_ADD                                      1  ~63     ~63, !0
         97        ROPE_END                                      2  ~62     ~63, '+is+in+April'
         98        ECHO                                                     ~62
         99      > JMP                                                      ->181
   27   100    >   IS_SMALLER_OR_EQUAL                              ~65     !13, !14
        101      > JMPZ_EX                                          ~65     ~65, ->104
        102    >   IS_SMALLER_OR_EQUAL                              ~66     !14, !5
        103        BOOL                                             ~65     ~66
        104    > > JMPZ                                                     ~65, ->110
   28   105    >   ROPE_INIT                                     3  ~68     'The+date+'
        106        ROPE_ADD                                      1  ~68     ~68, !0
        107        ROPE_END                                      2  ~67     ~68, '+is+in+May'
        108        ECHO                                                     ~67
        109      > JMP                                                      ->181
   29   110    >   IS_SMALLER_OR_EQUAL                              ~70     !13, !14
        111      > JMPZ_EX                                          ~70     ~70, ->114
        112    >   IS_SMALLER_OR_EQUAL                              ~71     !14, !6
        113        BOOL                                             ~70     ~71
        114    > > JMPZ                                                     ~70, ->120
   30   115    >   ROPE_INIT                                     3  ~73     'The+date+'
        116        ROPE_ADD                                      1  ~73     ~73, !0
        117        ROPE_END                                      2  ~72     ~73, '+is+in+June'
        118        ECHO                                                     ~72
        119      > JMP                                                      ->181
   31   120    >   IS_SMALLER_OR_EQUAL                              ~75     !13, !14
        121      > JMPZ_EX                                          ~75     ~75, ->124
        122    >   IS_SMALLER_OR_EQUAL                              ~76     !14, !7
        123        BOOL                                             ~75     ~76
        124    > > JMPZ                                                     ~75, ->130
   32   125    >   ROPE_INIT                                     3  ~78     'The+date+'
        126        ROPE_ADD                                      1  ~78     ~78, !0
        127        ROPE_END                                      2  ~77     ~78, '+is+in+July'
        128        ECHO                                                     ~77
        129      > JMP                                                      ->181
   33   130    >   IS_SMALLER_OR_EQUAL                              ~80     !13, !14
        131      > JMPZ_EX                                          ~80     ~80, ->134
        132    >   IS_SMALLER_OR_EQUAL                              ~81     !14, !8
        133        BOOL                                             ~80     ~81
        134    > > JMPZ                                                     ~80, ->140
   34   135    >   ROPE_INIT                                     3  ~83     'The+date+'
        136        ROPE_ADD                                      1  ~83     ~83, !0
        137        ROPE_END                                      2  ~82     ~83, '+is+in+August'
        138        ECHO                                                     ~82
        139      > JMP                                                      ->181
   35   140    >   IS_SMALLER_OR_EQUAL                              ~85     !13, !14
        141      > JMPZ_EX                                          ~85     ~85, ->144
        142    >   IS_SMALLER_OR_EQUAL                              ~86     !14, !9
        143        BOOL                                             ~85     ~86
        144    > > JMPZ                                                     ~85, ->150
   36   145    >   ROPE_INIT                                     3  ~88     'The+date+'
        146        ROPE_ADD                                      1  ~88     ~88, !0
        147        ROPE_END                                      2  ~87     ~88, '+is+in+September'
        148        ECHO                                                     ~87
        149      > JMP                                                      ->181
   37   150    >   IS_SMALLER_OR_EQUAL                              ~90     !13, !14
        151      > JMPZ_EX                                          ~90     ~90, ->154
        152    >   IS_SMALLER_OR_EQUAL                              ~91     !14, !10
        153        BOOL                                             ~90     ~91
        154    > > JMPZ                                                     ~90, ->160
   38   155    >   ROPE_INIT                                     3  ~93     'The+date+'
        156        ROPE_ADD                                      1  ~93     ~93, !0
        157        ROPE_END                                      2  ~92     ~93, '+is+in+October'
        158        ECHO                                                     ~92
        159      > JMP                                                      ->181
   39   160    >   IS_SMALLER_OR_EQUAL                              ~95     !13, !14
        161      > JMPZ_EX                                          ~95     ~95, ->164
        162    >   IS_SMALLER_OR_EQUAL                              ~96     !14, !11
        163        BOOL                                             ~95     ~96
        164    > > JMPZ                                                     ~95, ->170
   40   165    >   ROPE_INIT                                     3  ~98     'The+date+'
        166        ROPE_ADD                                      1  ~98     ~98, !0
        167        ROPE_END                                      2  ~97     ~98, '+is+in+November'
        168        ECHO                                                     ~97
        169      > JMP                                                      ->181
   41   170    >   IS_SMALLER_OR_EQUAL                              ~100    !13, !14
        171      > JMPZ_EX                                          ~100    ~100, ->174
        172    >   IS_SMALLER_OR_EQUAL                              ~101    !14, !12
        173        BOOL                                             ~100    ~101
        174    > > JMPZ                                                     ~100, ->180
   42   175    >   ROPE_INIT                                     3  ~103    'The+date+'
        176        ROPE_ADD                                      1  ~103    ~103, !0
        177        ROPE_END                                      2  ~102    ~103, '+is+in+December'
        178        ECHO                                                     ~102
        179      > JMP                                                      ->181
   44   180    >   ECHO                                                     'Something+has+gone+wrong%21'
   45   181    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.85 ms | 1412 KiB | 17 Q