3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myDate = new DateTime('26-11-2018'); // 13-11-2017 is not between you can test $start = new DateTime('1-11-2018'); $end = new DateTime('30-11-2018'); if ($myDate > $start && $myDate < $end ){ echo "Date is between"; }else{ echo "Date is not between!"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/Grv1X
function name:  (null)
number of ops:  21
compiled vars:  !0 = $myDate, !1 = $start, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '26-11-2018'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    3     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '1-11-2018'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    4     8        NEW                                              $9      'DateTime'
          9        SEND_VAL_EX                                              '30-11-2018'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $9
    6    12        IS_SMALLER                                       ~12     !1, !0
         13      > JMPZ_EX                                          ~12     ~12, ->16
         14    >   IS_SMALLER                                       ~13     !0, !2
         15        BOOL                                             ~12     ~13
         16    > > JMPZ                                                     ~12, ->19
    7    17    >   ECHO                                                     'Date+is+between'
    6    18      > JMP                                                      ->20
    9    19    >   ECHO                                                     'Date+is+not+between%21'
   11    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.54 ms | 999 KiB | 13 Q