3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cuttoff_time = "16:00"; date_default_timezone_set('Europe/London'); $store_ending_time = explode(":", $cuttoff_time); // what time on the day is cuttoff $dateNow = new DateTime('NOW'); $datedelivery = new DateTime('NOW'); $datedelivery->setTime($store_ending_time[0], $store_ending_time[1]); echo "<pre>"; print_r($datedelivery); $extraday = false; // is time after cuttof if (strtotime($dateNow->format('H:i:00')) > strtotime($store_ending_time[0] . ':' . $store_ending_time[1] . ":00")) { print_r($datedelivery); $datedelivery->modify('+1 day'); print_r($datedelivery); $extraday = true; } print_r($datedelivery); echo "<pre>";

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 56
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 56
filename:       /in/KEucO
function name:  (null)
number of ops:  61
compiled vars:  !0 = $cuttoff_time, !1 = $store_ending_time, !2 = $dateNow, !3 = $datedelivery, !4 = $extraday
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '16%3A00'
    4     1        INIT_FCALL                                               'date_default_timezone_set'
          2        SEND_VAL                                                 'Europe%2FLondon'
          3        DO_ICALL                                                 
    6     4        INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '%3A'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !1, $7
    7     9        NEW                                              $9      'DateTime'
         10        SEND_VAL_EX                                              'NOW'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $9
    8    13        NEW                                              $12     'DateTime'
         14        SEND_VAL_EX                                              'NOW'
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !3, $12
    9    17        INIT_METHOD_CALL                                         !3, 'setTime'
         18        CHECK_FUNC_ARG                                           
         19        FETCH_DIM_FUNC_ARG                               $15     !1, 0
         20        SEND_FUNC_ARG                                            $15
         21        CHECK_FUNC_ARG                                           
         22        FETCH_DIM_FUNC_ARG                               $16     !1, 1
         23        SEND_FUNC_ARG                                            $16
         24        DO_FCALL                                      0          
   10    25        ECHO                                                     '%3Cpre%3E'
   11    26        INIT_FCALL                                               'print_r'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                                 
   12    29        ASSIGN                                                   !4, <false>
   13    30        INIT_FCALL                                               'strtotime'
         31        INIT_METHOD_CALL                                         !2, 'format'
         32        SEND_VAL_EX                                              'H%3Ai%3A00'
         33        DO_FCALL                                      0  $20     
         34        SEND_VAR                                                 $20
         35        DO_ICALL                                         $21     
         36        INIT_FCALL                                               'strtotime'
         37        FETCH_DIM_R                                      ~22     !1, 0
         38        CONCAT                                           ~23     ~22, '%3A'
         39        FETCH_DIM_R                                      ~24     !1, 1
         40        CONCAT                                           ~25     ~23, ~24
         41        CONCAT                                           ~26     ~25, '%3A00'
         42        SEND_VAL                                                 ~26
         43        DO_ICALL                                         $27     
         44        IS_SMALLER                                               $27, $21
         45      > JMPZ                                                     ~28, ->56
   14    46    >   INIT_FCALL                                               'print_r'
         47        SEND_VAR                                                 !3
         48        DO_ICALL                                                 
   15    49        INIT_METHOD_CALL                                         !3, 'modify'
         50        SEND_VAL_EX                                              '%2B1+day'
         51        DO_FCALL                                      0          
   16    52        INIT_FCALL                                               'print_r'
         53        SEND_VAR                                                 !3
         54        DO_ICALL                                                 
   17    55        ASSIGN                                                   !4, <true>
   19    56    >   INIT_FCALL                                               'print_r'
         57        SEND_VAR                                                 !3
         58        DO_ICALL                                                 
   20    59        ECHO                                                     '%3Cpre%3E'
         60      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.11 ms | 1392 KiB | 21 Q