3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dates = date('Y-m-d'); $start = strtotime('2013-12-25'); $end = strtotime('2013-12-26'); foreach($dates AS $date) { $timestamp = strtotime($date); if($timestamp >= $start && $timestamp <= $end) { echo "The date $date is within our date range\n"; } else { echo "The date $date is NOT within our date range\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 33
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 33
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 22
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/6JVlh
function name:  (null)
number of ops:  35
compiled vars:  !0 = $dates, !1 = $start, !2 = $end, !3 = $date, !4 = $timestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y-m-d'
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    4     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '2013-12-25'
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !1, $7
    5     8        INIT_FCALL                                               'strtotime'
          9        SEND_VAL                                                 '2013-12-26'
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
    7    12      > FE_RESET_R                                       $11     !0, ->33
         13    > > FE_FETCH_R                                               $11, !3, ->33
    8    14    >   INIT_FCALL                                               'strtotime'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !4, $12
    9    18        IS_SMALLER_OR_EQUAL                              ~14     !1, !4
         19      > JMPZ_EX                                          ~14     ~14, ->22
         20    >   IS_SMALLER_OR_EQUAL                              ~15     !4, !2
         21        BOOL                                             ~14     ~15
         22    > > JMPZ                                                     ~14, ->28
   10    23    >   ROPE_INIT                                     3  ~17     'The+date+'
         24        ROPE_ADD                                      1  ~17     ~17, !3
         25        ROPE_END                                      2  ~16     ~17, '+is+within+our+date+range%0A'
         26        ECHO                                                     ~16
         27      > JMP                                                      ->32
   12    28    >   ROPE_INIT                                     3  ~20     'The+date+'
         29        ROPE_ADD                                      1  ~20     ~20, !3
         30        ROPE_END                                      2  ~19     ~20, '+is+NOT+within+our+date+range%0A'
         31        ECHO                                                     ~19
    7    32    > > JMP                                                      ->13
         33    >   FE_FREE                                                  $11
   14    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.53 ms | 1400 KiB | 17 Q