3v4l.org

run code in 300+ PHP versions simultaneously
<?php $today=date("D"); $time1=strtotime("now"); $time2=strtotime("11:59pm"); //echo date('m-d-Y',strtotime("next Thursday")); //echo $today; if ($today=="Tue" || $today=="Wed" ) { $day1="Friday ".date('m-d-Y',strtotime("next Friday")); $day2="Tuesday ".date('m-d-Y',strtotime("next Tuesday")); if ($today=="Tue") $day3="Wednesday ".date('m-d-Y',strtotime("+1 week 1 days")); else $day3="Wednesday ".date('m-d-Y',strtotime("next Wednesday")); $day4="Thursday ".date('m-d-Y',strtotime("next Thursday")); } else if ($today=="Sun" || $today=="Mon" ) { $day1="Wednesday ".date('m-d-Y',strtotime("next Wednesday")); $day2="Thursday ".date('m-d-Y',strtotime("next Thursday")); $day3="Friday ".date('m-d-Y',strtotime("next Friday")); if ($today=="Sun") $day4="Tuesday ".date('m-d-Y',strtotime("+1 week 2 days")); else $day4="Tuesday ".date('m-d-Y',strtotime("+1 week 1 days")); } else if ($today=="Thu" || $today=="Fri" || $today=="Sat" ) { $day1="Tuesday ".date('m-d-Y',strtotime("next Tuesday")); $day2="Wednesday ".date('m-d-Y',strtotime("next Wednesday")); if ($today=="Thu") { $day3="Thursday ".date('m-d-Y',strtotime("+1 week ")); $day4="Friday ".date('m-d-Y',strtotime("+1 week 1 days")); } else { $day3="Thursday ".date('m-d-Y',strtotime("next Thursday")); $day4="Friday ".date('m-d-Y',strtotime("next Friday")); } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 66
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 47
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 185
Branch analysis from position: 185
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 185
Branch analysis from position: 185
Branch analysis from position: 66
2 jumps found. (Code = 47) Position 1 = 68, Position 2 = 70
Branch analysis from position: 68
2 jumps found. (Code = 43) Position 1 = 71, Position 2 = 120
Branch analysis from position: 71
2 jumps found. (Code = 43) Position 1 = 100, Position 2 = 110
Branch analysis from position: 100
1 jumps found. (Code = 42) Position 1 = 119
Branch analysis from position: 119
1 jumps found. (Code = 42) Position 1 = 185
Branch analysis from position: 185
Branch analysis from position: 110
1 jumps found. (Code = 42) Position 1 = 185
Branch analysis from position: 185
Branch analysis from position: 120
2 jumps found. (Code = 47) Position 1 = 122, Position 2 = 124
Branch analysis from position: 122
2 jumps found. (Code = 47) Position 1 = 125, Position 2 = 127
Branch analysis from position: 125
2 jumps found. (Code = 43) Position 1 = 128, Position 2 = 185
Branch analysis from position: 128
2 jumps found. (Code = 43) Position 1 = 148, Position 2 = 167
Branch analysis from position: 148
1 jumps found. (Code = 42) Position 1 = 185
Branch analysis from position: 185
Branch analysis from position: 167
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 185
Branch analysis from position: 127
Branch analysis from position: 124
Branch analysis from position: 70
Branch analysis from position: 16
filename:       /in/uHKG2
function name:  (null)
number of ops:  186
compiled vars:  !0 = $today, !1 = $time1, !2 = $time2, !3 = $day1, !4 = $day2, !5 = $day3, !6 = $day4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'D'
          2        DO_ICALL                                         $7      
          3        ASSIGN                                                   !0, $7
    3     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 'now'
          6        DO_ICALL                                         $9      
          7        ASSIGN                                                   !1, $9
    4     8        INIT_FCALL                                               'strtotime'
          9        SEND_VAL                                                 '11%3A59pm'
         10        DO_ICALL                                         $11     
         11        ASSIGN                                                   !2, $11
    8    12        IS_EQUAL                                         ~13     !0, 'Tue'
         13      > JMPNZ_EX                                         ~13     ~13, ->16
         14    >   IS_EQUAL                                         ~14     !0, 'Wed'
         15        BOOL                                             ~13     ~14
         16    > > JMPZ                                                     ~13, ->66
    9    17    >   INIT_FCALL                                               'date'
         18        SEND_VAL                                                 'm-d-Y'
         19        INIT_FCALL                                               'strtotime'
         20        SEND_VAL                                                 'next+Friday'
         21        DO_ICALL                                         $15     
         22        SEND_VAR                                                 $15
         23        DO_ICALL                                         $16     
         24        CONCAT                                           ~17     'Friday+', $16
         25        ASSIGN                                                   !3, ~17
   10    26        INIT_FCALL                                               'date'
         27        SEND_VAL                                                 'm-d-Y'
         28        INIT_FCALL                                               'strtotime'
         29        SEND_VAL                                                 'next+Tuesday'
         30        DO_ICALL                                         $19     
         31        SEND_VAR                                                 $19
         32        DO_ICALL                                         $20     
         33        CONCAT                                           ~21     'Tuesday+', $20
         34        ASSIGN                                                   !4, ~21
   11    35        IS_EQUAL                                                 !0, 'Tue'
         36      > JMPZ                                                     ~23, ->47
   12    37    >   INIT_FCALL                                               'date'
         38        SEND_VAL                                                 'm-d-Y'
         39        INIT_FCALL                                               'strtotime'
         40        SEND_VAL                                                 '%2B1+week+1+days'
         41        DO_ICALL                                         $24     
         42        SEND_VAR                                                 $24
         43        DO_ICALL                                         $25     
         44        CONCAT                                           ~26     'Wednesday+', $25
         45        ASSIGN                                                   !5, ~26
         46      > JMP                                                      ->56
   14    47    >   INIT_FCALL                                               'date'
         48        SEND_VAL                                                 'm-d-Y'
         49        INIT_FCALL                                               'strtotime'
         50        SEND_VAL                                                 'next+Wednesday'
         51        DO_ICALL                                         $28     
         52        SEND_VAR                                                 $28
         53        DO_ICALL                                         $29     
         54        CONCAT                                           ~30     'Wednesday+', $29
         55        ASSIGN                                                   !5, ~30
   15    56    >   INIT_FCALL                                               'date'
         57        SEND_VAL                                                 'm-d-Y'
         58        INIT_FCALL                                               'strtotime'
         59        SEND_VAL                                                 'next+Thursday'
         60        DO_ICALL                                         $32     
         61        SEND_VAR                                                 $32
         62        DO_ICALL                                         $33     
         63        CONCAT                                           ~34     'Thursday+', $33
         64        ASSIGN                                                   !6, ~34
         65      > JMP                                                      ->185
   19    66    >   IS_EQUAL                                         ~36     !0, 'Sun'
         67      > JMPNZ_EX                                         ~36     ~36, ->70
         68    >   IS_EQUAL                                         ~37     !0, 'Mon'
         69        BOOL                                             ~36     ~37
         70    > > JMPZ                                                     ~36, ->120
   21    71    >   INIT_FCALL                                               'date'
         72        SEND_VAL                                                 'm-d-Y'
         73        INIT_FCALL                                               'strtotime'
         74        SEND_VAL                                                 'next+Wednesday'
         75        DO_ICALL                                         $38     
         76        SEND_VAR                                                 $38
         77        DO_ICALL                                         $39     
         78        CONCAT                                           ~40     'Wednesday+', $39
         79        ASSIGN                                                   !3, ~40
   22    80        INIT_FCALL                                               'date'
         81        SEND_VAL                                                 'm-d-Y'
         82        INIT_FCALL                                               'strtotime'
         83        SEND_VAL                                                 'next+Thursday'
         84        DO_ICALL                                         $42     
         85        SEND_VAR                                                 $42
         86        DO_ICALL                                         $43     
         87        CONCAT                                           ~44     'Thursday+', $43
         88        ASSIGN                                                   !4, ~44
   23    89        INIT_FCALL                                               'date'
         90        SEND_VAL                                                 'm-d-Y'
         91        INIT_FCALL                                               'strtotime'
         92        SEND_VAL                                                 'next+Friday'
         93        DO_ICALL                                         $46     
         94        SEND_VAR                                                 $46
         95        DO_ICALL                                         $47     
         96        CONCAT                                           ~48     'Friday+', $47
         97        ASSIGN                                                   !5, ~48
   24    98        IS_EQUAL                                                 !0, 'Sun'
         99      > JMPZ                                                     ~50, ->110
   25   100    >   INIT_FCALL                                               'date'
        101        SEND_VAL                                                 'm-d-Y'
        102        INIT_FCALL                                               'strtotime'
        103        SEND_VAL                                                 '%2B1+week+2+days'
        104        DO_ICALL                                         $51     
        105        SEND_VAR                                                 $51
        106        DO_ICALL                                         $52     
        107        CONCAT                                           ~53     'Tuesday+', $52
        108        ASSIGN                                                   !6, ~53
        109      > JMP                                                      ->119
   27   110    >   INIT_FCALL                                               'date'
        111        SEND_VAL                                                 'm-d-Y'
        112        INIT_FCALL                                               'strtotime'
        113        SEND_VAL                                                 '%2B1+week+1+days'
        114        DO_ICALL                                         $55     
        115        SEND_VAR                                                 $55
        116        DO_ICALL                                         $56     
        117        CONCAT                                           ~57     'Tuesday+', $56
        118        ASSIGN                                                   !6, ~57
        119    > > JMP                                                      ->185
   32   120    >   IS_EQUAL                                         ~59     !0, 'Thu'
        121      > JMPNZ_EX                                         ~59     ~59, ->124
        122    >   IS_EQUAL                                         ~60     !0, 'Fri'
        123        BOOL                                             ~59     ~60
        124    > > JMPNZ_EX                                         ~59     ~59, ->127
        125    >   IS_EQUAL                                         ~61     !0, 'Sat'
        126        BOOL                                             ~59     ~61
        127    > > JMPZ                                                     ~59, ->185
   33   128    >   INIT_FCALL                                               'date'
        129        SEND_VAL                                                 'm-d-Y'
        130        INIT_FCALL                                               'strtotime'
        131        SEND_VAL                                                 'next+Tuesday'
        132        DO_ICALL                                         $62     
        133        SEND_VAR                                                 $62
        134        DO_ICALL                                         $63     
        135        CONCAT                                           ~64     'Tuesday+', $63
        136        ASSIGN                                                   !3, ~64
   34   137        INIT_FCALL                                               'date'
        138        SEND_VAL                                                 'm-d-Y'
        139        INIT_FCALL                                               'strtotime'
        140        SEND_VAL                                                 'next+Wednesday'
        141        DO_ICALL                                         $66     
        142        SEND_VAR                                                 $66
        143        DO_ICALL                                         $67     
        144        CONCAT                                           ~68     'Wednesday+', $67
        145        ASSIGN                                                   !4, ~68
   36   146        IS_EQUAL                                                 !0, 'Thu'
        147      > JMPZ                                                     ~70, ->167
   38   148    >   INIT_FCALL                                               'date'
        149        SEND_VAL                                                 'm-d-Y'
        150        INIT_FCALL                                               'strtotime'
        151        SEND_VAL                                                 '%2B1+week+'
        152        DO_ICALL                                         $71     
        153        SEND_VAR                                                 $71
        154        DO_ICALL                                         $72     
        155        CONCAT                                           ~73     'Thursday+', $72
        156        ASSIGN                                                   !5, ~73
   39   157        INIT_FCALL                                               'date'
        158        SEND_VAL                                                 'm-d-Y'
        159        INIT_FCALL                                               'strtotime'
        160        SEND_VAL                                                 '%2B1+week+1+days'
        161        DO_ICALL                                         $75     
        162        SEND_VAR                                                 $75
        163        DO_ICALL                                         $76     
        164        CONCAT                                           ~77     'Friday+', $76
        165        ASSIGN                                                   !6, ~77
        166      > JMP                                                      ->185
   43   167    >   INIT_FCALL                                               'date'
        168        SEND_VAL                                                 'm-d-Y'
        169        INIT_FCALL                                               'strtotime'
        170        SEND_VAL                                                 'next+Thursday'
        171        DO_ICALL                                         $79     
        172        SEND_VAR                                                 $79
        173        DO_ICALL                                         $80     
        174        CONCAT                                           ~81     'Thursday+', $80
        175        ASSIGN                                                   !5, ~81
   44   176        INIT_FCALL                                               'date'
        177        SEND_VAL                                                 'm-d-Y'
        178        INIT_FCALL                                               'strtotime'
        179        SEND_VAL                                                 'next+Friday'
        180        DO_ICALL                                         $83     
        181        SEND_VAR                                                 $83
        182        DO_ICALL                                         $84     
        183        CONCAT                                           ~85     'Friday+', $84
        184        ASSIGN                                                   !6, ~85
   49   185    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.76 ms | 1412 KiB | 17 Q