3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($i = 1; $i < 10; $i++) { $today = strtotime("+$i days"); $quote_for = strtotime('+1 Weekday',strtotime("+$i days")); $diff = floor(($quote_for - $today)/86400); // difference in days echo "On " . date('l \t\h\e jS',$today) . " the shipping quote will be for " . date('l \t\h\e jS', $quote_for) . " which is " . abs($diff) . "days " . ($diff >0?"after":"before") . " today. \n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 2
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 2
Branch analysis from position: 54
Branch analysis from position: 2
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 2
Branch analysis from position: 54
Branch analysis from position: 2
filename:       /in/f97Q0
function name:  (null)
number of ops:  55
compiled vars:  !0 = $i, !1 = $today, !2 = $quote_for, !3 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->52
    5     2    >   INIT_FCALL                                               'strtotime'
          3        ROPE_INIT                                     3  ~6      '%2B'
          4        ROPE_ADD                                      1  ~6      ~6, !0
          5        ROPE_END                                      2  ~5      ~6, '+days'
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !1, $8
    6     9        INIT_FCALL                                               'strtotime'
         10        SEND_VAL                                                 '%2B1+Weekday'
         11        INIT_FCALL                                               'strtotime'
         12        ROPE_INIT                                     3  ~11     '%2B'
         13        ROPE_ADD                                      1  ~11     ~11, !0
         14        ROPE_END                                      2  ~10     ~11, '+days'
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                         $13     
         17        SEND_VAR                                                 $13
         18        DO_ICALL                                         $14     
         19        ASSIGN                                                   !2, $14
    7    20        INIT_FCALL                                               'floor'
         21        SUB                                              ~16     !2, !1
         22        DIV                                              ~17     ~16, 86400
         23        SEND_VAL                                                 ~17
         24        DO_ICALL                                         $18     
         25        ASSIGN                                                   !3, $18
    9    26        INIT_FCALL                                               'date'
         27        SEND_VAL                                                 'l+%5Ct%5Ch%5Ce+jS'
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                         $20     
         30        CONCAT                                           ~21     'On+', $20
   10    31        CONCAT                                           ~22     ~21, '+the+shipping+quote+will+be+for++'
         32        INIT_FCALL                                               'date'
         33        SEND_VAL                                                 'l+%5Ct%5Ch%5Ce+jS'
         34        SEND_VAR                                                 !2
         35        DO_ICALL                                         $23     
         36        CONCAT                                           ~24     ~22, $23
   11    37        CONCAT                                           ~25     ~24, '+which+is+'
         38        INIT_FCALL                                               'abs'
         39        SEND_VAR                                                 !3
         40        DO_ICALL                                         $26     
         41        CONCAT                                           ~27     ~25, $26
         42        CONCAT                                           ~28     ~27, 'days+'
         43        IS_SMALLER                                               0, !3
         44      > JMPZ                                                     ~29, ->47
         45    >   QM_ASSIGN                                        ~30     'after'
         46      > JMP                                                      ->48
         47    >   QM_ASSIGN                                        ~30     'before'
         48    >   CONCAT                                           ~31     ~28, ~30
         49        CONCAT                                           ~32     ~31, '+today.+%0A'
         50        ECHO                                                     ~32
    3    51        PRE_INC                                                  !0
         52    >   IS_SMALLER                                               !0, 10
         53      > JMPNZ                                                    ~34, ->2
   13    54    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.6 ms | 1400 KiB | 21 Q