3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime('2016-01-10 23:30:59'); $start = new DateTime('saturday this week 15:00'); $end = new DateTime('monday next week 08:00'); $departure = new DateTime('2016-01-11 23:30:59'); echo $now->format('Y-m-d H:i:s'). PHP_EOL; echo $start->format('Y-m-d H:i:s'). PHP_EOL; echo $end->format('Y-m-d H:i:s'). PHP_EOL; if ($now > $start && $now < $end) { echo 'Error! Please contact administrator!'; } if (true) { $diff = strtotime($departure->format('Y-m-d H:i:s')) - strtotime($now->format('Y-m-d H:i:s')); echo $diff/3600; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 37
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 54
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 54
Branch analysis from position: 37
Branch analysis from position: 35
filename:       /in/detBD
function name:  (null)
number of ops:  55
compiled vars:  !0 = $now, !1 = $start, !2 = $end, !3 = $departure, !4 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $5      'DateTime'
          1        SEND_VAL_EX                                              '2016-01-10+23%3A30%3A59'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    3     4        NEW                                              $8      'DateTime'
          5        SEND_VAL_EX                                              'saturday+this+week+15%3A00'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
    4     8        NEW                                              $11     'DateTime'
          9        SEND_VAL_EX                                              'monday+next+week+08%3A00'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $11
    5    12        NEW                                              $14     'DateTime'
         13        SEND_VAL_EX                                              '2016-01-11+23%3A30%3A59'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !3, $14
    6    16        INIT_METHOD_CALL                                         !0, 'format'
         17        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         18        DO_FCALL                                      0  $17     
         19        CONCAT                                           ~18     $17, '%0A'
         20        ECHO                                                     ~18
    7    21        INIT_METHOD_CALL                                         !1, 'format'
         22        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         23        DO_FCALL                                      0  $19     
         24        CONCAT                                           ~20     $19, '%0A'
         25        ECHO                                                     ~20
    8    26        INIT_METHOD_CALL                                         !2, 'format'
         27        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         28        DO_FCALL                                      0  $21     
         29        CONCAT                                           ~22     $21, '%0A'
         30        ECHO                                                     ~22
    9    31        IS_SMALLER                                       ~23     !1, !0
         32      > JMPZ_EX                                          ~23     ~23, ->35
         33    >   IS_SMALLER                                       ~24     !0, !2
         34        BOOL                                             ~23     ~24
         35    > > JMPZ                                                     ~23, ->37
   10    36    >   ECHO                                                     'Error%21+Please+contact+administrator%21'
   12    37    > > JMPZ                                                     <true>, ->54
   13    38    >   INIT_FCALL                                               'strtotime'
         39        INIT_METHOD_CALL                                         !3, 'format'
         40        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         41        DO_FCALL                                      0  $25     
         42        SEND_VAR                                                 $25
         43        DO_ICALL                                         $26     
         44        INIT_FCALL                                               'strtotime'
         45        INIT_METHOD_CALL                                         !0, 'format'
         46        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         47        DO_FCALL                                      0  $27     
         48        SEND_VAR                                                 $27
         49        DO_ICALL                                         $28     
         50        SUB                                              ~29     $26, $28
         51        ASSIGN                                                   !4, ~29
   14    52        DIV                                              ~31     !4, 3600
         53        ECHO                                                     ~31
   15    54    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.03 ms | 1400 KiB | 15 Q