3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('1 January 2021'); $end = new DateTime('31 January 2021'); $today = new DateTime(); if($today >= $start && $today <= $end){ echo 'In between'; } else { echo 'outside or range'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/pEdLM
function name:  (null)
number of ops:  20
compiled vars:  !0 = $start, !1 = $end, !2 = $today
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '1+January+2021'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '31+January+2021'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    5     8        NEW                                              $9      'DateTime'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $9
    6    11        IS_SMALLER_OR_EQUAL                              ~12     !0, !2
         12      > JMPZ_EX                                          ~12     ~12, ->15
         13    >   IS_SMALLER_OR_EQUAL                              ~13     !2, !1
         14        BOOL                                             ~12     ~13
         15    > > JMPZ                                                     ~12, ->18
    7    16    >   ECHO                                                     'In+between'
    6    17      > JMP                                                      ->19
    9    18    >   ECHO                                                     'outside+or+range'
   10    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.11 ms | 1002 KiB | 13 Q