3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.54 ms | 1399 KiB | 13 Q