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) { echo $departure->diff($now); }
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 = 42
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
Branch analysis from position: 37
Branch analysis from position: 35
filename:       /in/4d8Lf
function name:  (null)
number of ops:  43
compiled vars:  !0 = $now, !1 = $start, !2 = $end, !3 = $departure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DateTime'
          1        SEND_VAL_EX                                              '2016-01-10+23%3A30%3A59'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    3     4        NEW                                              $7      'DateTime'
          5        SEND_VAL_EX                                              'saturday+this+week+15%3A00'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
    4     8        NEW                                              $10     'DateTime'
          9        SEND_VAL_EX                                              'monday+next+week+08%3A00'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $10
    5    12        NEW                                              $13     'DateTime'
         13        SEND_VAL_EX                                              '2016-01-11+23%3A30%3A59'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !3, $13
    6    16        INIT_METHOD_CALL                                         !0, 'format'
         17        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         18        DO_FCALL                                      0  $16     
         19        CONCAT                                           ~17     $16, '%0A'
         20        ECHO                                                     ~17
    7    21        INIT_METHOD_CALL                                         !1, 'format'
         22        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         23        DO_FCALL                                      0  $18     
         24        CONCAT                                           ~19     $18, '%0A'
         25        ECHO                                                     ~19
    8    26        INIT_METHOD_CALL                                         !2, 'format'
         27        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         28        DO_FCALL                                      0  $20     
         29        CONCAT                                           ~21     $20, '%0A'
         30        ECHO                                                     ~21
    9    31        IS_SMALLER                                       ~22     !1, !0
         32      > JMPZ_EX                                          ~22     ~22, ->35
         33    >   IS_SMALLER                                       ~23     !0, !2
         34        BOOL                                             ~22     ~23
         35    > > JMPZ                                                     ~22, ->37
   10    36    >   ECHO                                                     'Error%21+Please+contact+administrator%21'
   12    37    > > JMPZ                                                     <true>, ->42
   13    38    >   INIT_METHOD_CALL                                         !3, 'diff'
         39        SEND_VAR_EX                                              !0
         40        DO_FCALL                                      0  $24     
         41        ECHO                                                     $24
   14    42    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.01 ms | 1399 KiB | 13 Q