3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.7 ms | 1396 KiB | 15 Q