3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time_intervals = preg_split('/[\;]+/', $time_intervals); //separates the intervals by ; $time_valid = false; $i = 0; $time_to_check = strtotime(date('H:i', strtotime($time_to_check))); foreach ($time_intervals as $time_interval): $time = preg_split('/[\-]+/', $time_interval); if (($time_to_check >= strtotime($time[0])) && ($time_to_check <= strtotime($time[1]))): $time_valid = true; endif; endforeach; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 40
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 40
Branch analysis from position: 20
2 jumps found. (Code = 46) Position 1 = 31, Position 2 = 37
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 39
Branch analysis from position: 37
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/8beWe
function name:  (null)
number of ops:  42
compiled vars:  !0 = $time_intervals, !1 = $time_valid, !2 = $i, !3 = $time_to_check, !4 = $time_interval, !5 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_split'
          1        SEND_VAL                                                 '%2F%5B%5C%3B%5D%2B%2F'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !0, $6
    5     5        ASSIGN                                                   !1, <false>
    6     6        ASSIGN                                                   !2, 0
    7     7        INIT_FCALL                                               'strtotime'
          8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'H%3Ai'
         10        INIT_FCALL                                               'strtotime'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $10     
         13        SEND_VAR                                                 $10
         14        DO_ICALL                                         $11     
         15        SEND_VAR                                                 $11
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !3, $12
    9    18      > FE_RESET_R                                       $14     !0, ->40
         19    > > FE_FETCH_R                                               $14, !4, ->40
   10    20    >   INIT_FCALL                                               'preg_split'
         21        SEND_VAL                                                 '%2F%5B%5C-%5D%2B%2F'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                         $15     
         24        ASSIGN                                                   !5, $15
   12    25        INIT_FCALL                                               'strtotime'
         26        FETCH_DIM_R                                      ~17     !5, 0
         27        SEND_VAL                                                 ~17
         28        DO_ICALL                                         $18     
         29        IS_SMALLER_OR_EQUAL                              ~19     $18, !3
         30      > JMPZ_EX                                          ~19     ~19, ->37
         31    >   INIT_FCALL                                               'strtotime'
         32        FETCH_DIM_R                                      ~20     !5, 1
         33        SEND_VAL                                                 ~20
         34        DO_ICALL                                         $21     
         35        IS_SMALLER_OR_EQUAL                              ~22     !3, $21
         36        BOOL                                             ~19     ~22
         37    > > JMPZ                                                     ~19, ->39
   14    38    >   ASSIGN                                                   !1, <true>
    9    39    > > JMP                                                      ->19
         40    >   FE_FREE                                                  $14
   21    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.81 ms | 1400 KiB | 19 Q