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")); $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 = 23, Position 2 = 29
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/gvj5E
function name:  (null)
number of ops:  32
compiled vars:  !0 = $nonNewDay, !1 = $current_date, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   35     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
   36     8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'N'
         10        DO_ICALL                                         $7      
         11        SUB                                              ~8      $7, 1
         12        FETCH_DIM_R                                      ~9      !0, ~8
         13        ASSIGN                                                   !2, ~9
   37    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
   38    17        INIT_FCALL                                               'strtotime'
         18        FETCH_DIM_R                                      ~12     !2, 0
         19        SEND_VAL                                                 ~12
         20        DO_ICALL                                         $13     
         21        IS_SMALLER_OR_EQUAL                              ~14     $13, !1
         22      > JMPZ_EX                                          ~14     ~14, ->29
         23    >   INIT_FCALL                                               'strtotime'
         24        FETCH_DIM_R                                      ~15     !2, 1
         25        SEND_VAL                                                 ~15
         26        DO_ICALL                                         $16     
         27        IS_SMALLER                                       ~17     !1, $16
         28        BOOL                                             ~14     ~17
         29    > > JMPZ                                                     ~14, ->31
   39    30    > > EXIT                                                     'Blocked'
   41    31    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.01 ms | 1396 KiB | 19 Q