3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function isCheckInTooSoon($lowerLimit) { //$currentHours = $this->get('TimeService')->getCurrentHour(); $currentHours = date('Hi'); return $currentHours < $lowerLimit; } function isCheckInAfterCheckOutLimit($upperLimit) { //$currentHours = $this->get('TimeService')->getCurrentHour(); $currentHours = date('Hi'); return $currentHours > $upperLimit; } print_r('is it too soon?'); var_dump(isCheckInTooSoon('0815')); print_r('is it too late?'); var_dump(isCheckInAfterCheckOutLimit('2000'));
based on IKQau
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/2N6JZ
function name:  (null)
number of ops:  21
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  11     1        NOP                                                      
  19     2        INIT_FCALL                                               'print_r'
         3        SEND_VAL                                                 'is+it+too+soon%3F'
         4        DO_ICALL                                                 
  20     5        INIT_FCALL                                               'var_dump'
         6        INIT_FCALL                                               'ischeckintoosoon'
         7        SEND_VAL                                                 '0815'
         8        DO_FCALL                                      0  $1      
         9        SEND_VAR                                                 $1
        10        DO_ICALL                                                 
  21    11        INIT_FCALL                                               'print_r'
        12        SEND_VAL                                                 'is+it+too+late%3F'
        13        DO_ICALL                                                 
  22    14        INIT_FCALL                                               'var_dump'
        15        INIT_FCALL                                               'ischeckinaftercheckoutlimit'
        16        SEND_VAL                                                 '2000'
        17        DO_FCALL                                      0  $4      
        18        SEND_VAR                                                 $4
        19        DO_ICALL                                                 
        20      > RETURN                                                   1

Function ischeckintoosoon:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/2N6JZ
function name:  isCheckInTooSoon
number of ops:  8
compiled vars:  !0 = $lowerLimit, !1 = $currentHours
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   RECV                                             !0      
   6     1        INIT_FCALL                                               'date'
         2        SEND_VAL                                                 'Hi'
         3        DO_ICALL                                         $2      
         4        ASSIGN                                                   !1, $2
   8     5        IS_SMALLER                                       ~4      !1, !0
         6      > RETURN                                                   ~4
   9     7*     > RETURN                                                   null

End of function ischeckintoosoon

Function ischeckinaftercheckoutlimit:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/2N6JZ
function name:  isCheckInAfterCheckOutLimit
number of ops:  8
compiled vars:  !0 = $upperLimit, !1 = $currentHours
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  11     0  E >   RECV                                             !0      
  14     1        INIT_FCALL                                               'date'
         2        SEND_VAL                                                 'Hi'
         3        DO_ICALL                                         $2      
         4        ASSIGN                                                   !1, $2
  16     5        IS_SMALLER                                       ~4      !0, !1
         6      > RETURN                                                   ~4
  17     7*     > RETURN                                                   null

End of function ischeckinaftercheckoutlimit

Generated using Vulcan Logic Dumper, using php 7.1.0