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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.2 ms | 1399 KiB | 13 Q