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-12 23:30:59'); $diff = ($departure->getTimestamp() - $now->getTimestamp()) /3600; echo $diff . PHP_EOL;; 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 && $diff <= 72) { echo 'Error! Please contact administrator!'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 42, Position 2 = 44
Branch analysis from position: 42
2 jumps found. (Code = 46) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 49
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
Branch analysis from position: 47
Branch analysis from position: 44
filename:       /in/5h8Qu
function name:  (null)
number of ops:  50
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-12+23%3A30%3A59'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !3, $14
    6    16        INIT_METHOD_CALL                                         !3, 'getTimestamp'
         17        DO_FCALL                                      0  $17     
         18        INIT_METHOD_CALL                                         !0, 'getTimestamp'
         19        DO_FCALL                                      0  $18     
         20        SUB                                              ~19     $17, $18
         21        DIV                                              ~20     ~19, 3600
         22        ASSIGN                                                   !4, ~20
    7    23        CONCAT                                           ~22     !4, '%0A'
         24        ECHO                                                     ~22
    8    25        INIT_METHOD_CALL                                         !0, 'format'
         26        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         27        DO_FCALL                                      0  $23     
         28        CONCAT                                           ~24     $23, '%0A'
         29        ECHO                                                     ~24
    9    30        INIT_METHOD_CALL                                         !1, 'format'
         31        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         32        DO_FCALL                                      0  $25     
         33        CONCAT                                           ~26     $25, '%0A'
         34        ECHO                                                     ~26
   10    35        INIT_METHOD_CALL                                         !2, 'format'
         36        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         37        DO_FCALL                                      0  $27     
         38        CONCAT                                           ~28     $27, '%0A'
         39        ECHO                                                     ~28
   11    40        IS_SMALLER                                       ~29     !1, !0
         41      > JMPZ_EX                                          ~29     ~29, ->44
         42    >   IS_SMALLER                                       ~30     !0, !2
         43        BOOL                                             ~29     ~30
         44    > > JMPZ_EX                                          ~29     ~29, ->47
         45    >   IS_SMALLER_OR_EQUAL                              ~31     !4, 72
         46        BOOL                                             ~29     ~31
         47    > > JMPZ                                                     ~29, ->49
   12    48    >   ECHO                                                     'Error%21+Please+contact+administrator%21'
   13    49    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.79 ms | 1399 KiB | 13 Q