3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nonNewDay = array( array( '2:00 am', '11:00 am' ), array( '2:00 am', '11:00 am' ), array( '2:00 am', '11:00 am' ), array( '2:00 am', '11:00 am' ), array( '2:00 am', '11:00 am' ), // Weekends array( '2:00 am', '1:00 pm' ), array( '2:00 am', '12:00 pm' ), ); $current_date = strtotime(date("g:00 a")); echo date('N'); $value = $nonNewDay[date('N')-1]; var_dump($value); if ((strtotime($value[0]) <= $current_date) && ($current_date < strtotime($value[1]))) { //die('Blocked'); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 27, Position 2 = 33
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
Branch analysis from position: 33
filename:       /in/k39LP
function name:  (null)
number of ops:  35
compiled vars:  !0 = $nonNewDay, !1 = $current_date, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   34     1        INIT_FCALL                                               'strtotime'
          2        INIT_FCALL                                               'date'
          3        SEND_VAL                                                 'g%3A00+a'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
   35     8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'N'
         10        DO_ICALL                                         $7      
         11        ECHO                                                     $7
   36    12        INIT_FCALL                                               'date'
         13        SEND_VAL                                                 'N'
         14        DO_ICALL                                         $8      
         15        SUB                                              ~9      $8, 1
         16        FETCH_DIM_R                                      ~10     !0, ~9
         17        ASSIGN                                                   !2, ~10
   37    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
   38    21        INIT_FCALL                                               'strtotime'
         22        FETCH_DIM_R                                      ~13     !2, 0
         23        SEND_VAL                                                 ~13
         24        DO_ICALL                                         $14     
         25        IS_SMALLER_OR_EQUAL                              ~15     $14, !1
         26      > JMPZ_EX                                          ~15     ~15, ->33
         27    >   INIT_FCALL                                               'strtotime'
         28        FETCH_DIM_R                                      ~16     !2, 1
         29        SEND_VAL                                                 ~16
         30        DO_ICALL                                         $17     
         31        IS_SMALLER                                       ~18     !1, $17
         32        BOOL                                             ~15     ~18
         33    > > JMPZ                                                     ~15, ->34
   41    34    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.17 ms | 1396 KiB | 19 Q