3v4l.org

run code in 300+ PHP versions simultaneously
<?php $interval1_start = 60 * 60 * 8; // 8am $interval1_end = 60 * 60 * 12 -1; // 11:59:59am $interval2_start = 60 * 60 * 12; // 12pm $interval2_end = 60 * 60 * 16 -1; // 15:59:59pm $interval3_start = 60 * 60 * 15; // 15pm $interval3_end = 60 * 60 * 20 -1; // 15:59:59pm $init_time = strtotime(date('Y-m-d')); $cur_time = time(); echo $cur_time . ' / ' . $init_time; $diff = $cur_time - $init_time; if ($diff >= $interval1_start && $diff <= $interval1_end) { echo 'code 1'; } elseif ($diff >= $interval2_start && $diff <= $interval2_end) { echo 'code 2'; } elseif ($diff >= $interval3_start && $diff <= $interval3_end) { echo 'code 3'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 46) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 35
2 jumps found. (Code = 46) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 41
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
Branch analysis from position: 39
Branch analysis from position: 32
Branch analysis from position: 25
filename:       /in/ONDXK
function name:  (null)
number of ops:  42
compiled vars:  !0 = $interval1_start, !1 = $interval1_end, !2 = $interval2_start, !3 = $interval2_end, !4 = $interval3_start, !5 = $interval3_end, !6 = $init_time, !7 = $cur_time, !8 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 28800
    4     1        ASSIGN                                                   !1, 43199
    5     2        ASSIGN                                                   !2, 43200
    6     3        ASSIGN                                                   !3, 57599
    7     4        ASSIGN                                                   !4, 54000
    8     5        ASSIGN                                                   !5, 71999
   10     6        INIT_FCALL                                               'strtotime'
          7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'Y-m-d'
          9        DO_ICALL                                         $15     
         10        SEND_VAR                                                 $15
         11        DO_ICALL                                         $16     
         12        ASSIGN                                                   !6, $16
   11    13        INIT_FCALL                                               'time'
         14        DO_ICALL                                         $18     
         15        ASSIGN                                                   !7, $18
   13    16        CONCAT                                           ~20     !7, '+%2F+'
         17        CONCAT                                           ~21     ~20, !6
         18        ECHO                                                     ~21
   15    19        SUB                                              ~22     !7, !6
         20        ASSIGN                                                   !8, ~22
   18    21        IS_SMALLER_OR_EQUAL                              ~24     !0, !8
         22      > JMPZ_EX                                          ~24     ~24, ->25
         23    >   IS_SMALLER_OR_EQUAL                              ~25     !8, !1
         24        BOOL                                             ~24     ~25
         25    > > JMPZ                                                     ~24, ->28
   19    26    >   ECHO                                                     'code+1'
         27      > JMP                                                      ->41
   21    28    >   IS_SMALLER_OR_EQUAL                              ~26     !2, !8
         29      > JMPZ_EX                                          ~26     ~26, ->32
         30    >   IS_SMALLER_OR_EQUAL                              ~27     !8, !3
         31        BOOL                                             ~26     ~27
         32    > > JMPZ                                                     ~26, ->35
   22    33    >   ECHO                                                     'code+2'
         34      > JMP                                                      ->41
   24    35    >   IS_SMALLER_OR_EQUAL                              ~28     !4, !8
         36      > JMPZ_EX                                          ~28     ~28, ->39
         37    >   IS_SMALLER_OR_EQUAL                              ~29     !8, !5
         38        BOOL                                             ~28     ~29
         39    > > JMPZ                                                     ~28, ->41
   25    40    >   ECHO                                                     'code+3'
   26    41    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.1 ms | 1400 KiB | 19 Q