3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkSlotRange($as,$ae,$bs,$be){ $as = strtotime($as); $ae = strtotime($ae); $bs = strtotime($bs); $be = strtotime($be); return ($as >= $bs && $ae <= $be); } var_dump(checkSlotRange("10:30", "11:30", "09:30", "12:30")); // true var_dump(checkSlotRange("10:30", "11:30", "11:20", "12:30")); // false
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3P3OD
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'checkslotrange'
          2        SEND_VAL                                                 '10%3A30'
          3        SEND_VAL                                                 '11%3A30'
          4        SEND_VAL                                                 '09%3A30'
          5        SEND_VAL                                                 '12%3A30'
          6        DO_FCALL                                      0  $0      
          7        SEND_VAR                                                 $0
          8        DO_ICALL                                                 
   10     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'checkslotrange'
         11        SEND_VAL                                                 '10%3A30'
         12        SEND_VAL                                                 '11%3A30'
         13        SEND_VAL                                                 '11%3A20'
         14        SEND_VAL                                                 '12%3A30'
         15        DO_FCALL                                      0  $2      
         16        SEND_VAR                                                 $2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function checkslotrange:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/3P3OD
function name:  checkSlotRange
number of ops:  26
compiled vars:  !0 = $as, !1 = $ae, !2 = $bs, !3 = $be
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    3     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
    4     8        INIT_FCALL                                               'strtotime'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !1, $6
    5    12        INIT_FCALL                                               'strtotime'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !2, $8
    6    16        INIT_FCALL                                               'strtotime'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $10     
         19        ASSIGN                                                   !3, $10
    7    20        IS_SMALLER_OR_EQUAL                              ~12     !2, !0
         21      > JMPZ_EX                                          ~12     ~12, ->24
         22    >   IS_SMALLER_OR_EQUAL                              ~13     !1, !3
         23        BOOL                                             ~12     ~13
         24    > > RETURN                                                   ~12
    8    25*     > RETURN                                                   null

End of function checkslotrange

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.81 ms | 1019 KiB | 17 Q