3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dates = array ('24-12-2013', '25-12-2013', '26-12-2014', '27-12-2013'); $start = strtotime('25-12-2013'); $end = strtotime('27-12-2013'); 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
Jump found. Position 1 = 10, Position 2 = 30
Branch analysis from position: 10
Jump found. Position 1 = 11, Position 2 = 30
Branch analysis from position: 11
Jump found. Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
Jump found. Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
Jump found. Position 1 = 29
Branch analysis from position: 29
Jump found. Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 25
Jump found. Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 19
Branch analysis from position: 30
Jump found. Position 1 = -2
Branch analysis from position: 30
filename:       /in/5kper
function name:  (null)
number of ops:  32
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                                                 '25-12-2013'
         3        DO_ICALL                                         $6      
         4        ASSIGN                                                   !1, $6
   5     5        INIT_FCALL                                               'strtotime'
         6        SEND_VAL                                                 '27-12-2013'
         7        DO_ICALL                                         $8      
         8        ASSIGN                                                   !2, $8
   7     9      > FE_RESET_R                                       $10     !0, ->30
        10    > > FE_FETCH_R                                               $10, !3, ->30
   8    11    >   INIT_FCALL                                               'strtotime'
        12        SEND_VAR                                                 !3
        13        DO_ICALL                                         $11     
        14        ASSIGN                                                   !4, $11
   9    15        IS_SMALLER_OR_EQUAL                              ~13     !1, !4
        16      > JMPZ_EX                                          ~13     ~13, ->19
        17    >   IS_SMALLER_OR_EQUAL                              ~14     !4, !2
        18        BOOL                                             ~13     ~14
        19    > > JMPZ                                                     ~13, ->25
  10    20    >   ROPE_INIT                                     3  ~16     'The+date+'
        21        ROPE_ADD                                      1  ~16     ~16, !3
        22        ROPE_END                                      2  ~15     ~16, '+is+within+our+date+range%0A'
        23        ECHO                                                     ~15
        24      > JMP                                                      ->29
  12    25    >   ROPE_INIT                                     3  ~19     'The+date+'
        26        ROPE_ADD                                      1  ~19     ~19, !3
        27        ROPE_END                                      2  ~18     ~19, '+is+NOT+within+our+date+range%0A'
        28        ECHO                                                     ~18
        29    > > JMP                                                      ->10
        30    >   FE_FREE                                                  $10
        31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0