3v4l.org

run code in 300+ PHP versions simultaneously
<?php $limited_times['Tuesday'] = "11,2,3"; $limited_times['EXPRESS'] = "5"; foreach ($limited_times as $day => $hours) { $hours_array = explode(",", $hours); if (date("l") == $day && in_array(date("H"), $hours_array)) { echo "TRUE WAS HIT!"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 28
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 28
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 25
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 27
Branch analysis from position: 25
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/ifv2k
function name:  (null)
number of ops:  30
compiled vars:  !0 = $limited_times, !1 = $hours, !2 = $day, !3 = $hours_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 'Tuesday'
          1        OP_DATA                                                  '11%2C2%2C3'
    4     2        ASSIGN_DIM                                               !0, 'EXPRESS'
          3        OP_DATA                                                  '5'
    6     4      > FE_RESET_R                                       $6      !0, ->28
          5    > > FE_FETCH_R                                       ~7      $6, !1, ->28
          6    >   ASSIGN                                                   !2, ~7
    7     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '%2C'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !3, $9
    8    12        INIT_FCALL                                               'date'
         13        SEND_VAL                                                 'l'
         14        DO_ICALL                                         $11     
         15        IS_EQUAL                                         ~12     !2, $11
         16      > JMPZ_EX                                          ~12     ~12, ->25
         17    >   INIT_FCALL                                               'in_array'
         18        INIT_FCALL                                               'date'
         19        SEND_VAL                                                 'H'
         20        DO_ICALL                                         $13     
         21        SEND_VAR                                                 $13
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                         $14     
         24        BOOL                                             ~12     $14
         25    > > JMPZ                                                     ~12, ->27
    9    26    >   ECHO                                                     'TRUE+WAS+HIT%21'
    6    27    > > JMP                                                      ->5
         28    >   FE_FREE                                                  $6
   11    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.01 ms | 1396 KiB | 19 Q