3v4l.org

run code in 300+ PHP versions simultaneously
<?php $interval = "00:00-23:59"; $pickup_time = "2014-05-08 23:58:00"; $interval = explode("-",$interval); $start = str_replace (":", "", $interval[0]); $end = str_replace (":", "", $interval[1]); $pickup_time = (int) date('Gi', strtotime($pickup_time)); if ($pickup_time >= $start && $pickup_time <= $end ){ $asd = true; }else{ $asd = false; } var_dump($asd);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/BChls
function name:  (null)
number of ops:  42
compiled vars:  !0 = $interval, !1 = $pickup_time, !2 = $start, !3 = $end, !4 = $asd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '00%3A00-23%3A59'
    3     1        ASSIGN                                                   !1, '2014-05-08+23%3A58%3A00'
    5     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '-'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !0, $7
    6     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 '%3A'
          9        SEND_VAL                                                 ''
         10        FETCH_DIM_R                                      ~9      !0, 0
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !2, $10
    7    14        INIT_FCALL                                               'str_replace'
         15        SEND_VAL                                                 '%3A'
         16        SEND_VAL                                                 ''
         17        FETCH_DIM_R                                      ~12     !0, 1
         18        SEND_VAL                                                 ~12
         19        DO_ICALL                                         $13     
         20        ASSIGN                                                   !3, $13
    9    21        INIT_FCALL                                               'date'
         22        SEND_VAL                                                 'Gi'
         23        INIT_FCALL                                               'strtotime'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $15     
         26        SEND_VAR                                                 $15
         27        DO_ICALL                                         $16     
         28        CAST                                          4  ~17     $16
         29        ASSIGN                                                   !1, ~17
   11    30        IS_SMALLER_OR_EQUAL                              ~19     !2, !1
         31      > JMPZ_EX                                          ~19     ~19, ->34
         32    >   IS_SMALLER_OR_EQUAL                              ~20     !1, !3
         33        BOOL                                             ~19     ~20
         34    > > JMPZ                                                     ~19, ->37
   12    35    >   ASSIGN                                                   !4, <true>
         36      > JMP                                                      ->38
   14    37    >   ASSIGN                                                   !4, <false>
   16    38    >   INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !4
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.53 ms | 1400 KiB | 23 Q