3v4l.org

run code in 300+ PHP versions simultaneously
<?php $format = 'd/m/Y'; foreach (range(1, 7) as $number) { $difference = date($format, strtotime('+' . $number . ' days')); $day = strtolower(date('l', $difference)); $$day = $difference; } $todayName = strtolower(date('l')); $$todayName = date($format); var_dump($monday); var_dump($tuesday); var_dump($wednesday); var_dump($thursday); var_dump($friday); var_dump($saturday); var_dump($sunday);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 28
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 28
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/LkSrl
function name:  (null)
number of ops:  63
compiled vars:  !0 = $format, !1 = $number, !2 = $difference, !3 = $day, !4 = $todayName, !5 = $monday, !6 = $tuesday, !7 = $wednesday, !8 = $thursday, !9 = $friday, !10 = $saturday, !11 = $sunday
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'd%2Fm%2FY'
    5     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 7
          4        DO_ICALL                                         $13     
          5      > FE_RESET_R                                       $14     $13, ->28
          6    > > FE_FETCH_R                                               $14, !1, ->28
    6     7    >   INIT_FCALL                                               'date'
          8        SEND_VAR                                                 !0
          9        INIT_FCALL                                               'strtotime'
         10        CONCAT                                           ~15     '%2B', !1
         11        CONCAT                                           ~16     ~15, '+days'
         12        SEND_VAL                                                 ~16
         13        DO_ICALL                                         $17     
         14        SEND_VAR                                                 $17
         15        DO_ICALL                                         $18     
         16        ASSIGN                                                   !2, $18
    7    17        INIT_FCALL                                               'strtolower'
         18        INIT_FCALL                                               'date'
         19        SEND_VAL                                                 'l'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $20     
         22        SEND_VAR                                                 $20
         23        DO_ICALL                                         $21     
         24        ASSIGN                                                   !3, $21
    8    25        FETCH_W                      local               $23     !3
         26        ASSIGN                                                   $23, !2
    5    27      > JMP                                                      ->6
         28    >   FE_FREE                                                  $14
   11    29        INIT_FCALL                                               'strtolower'
         30        INIT_FCALL                                               'date'
         31        SEND_VAL                                                 'l'
         32        DO_ICALL                                         $25     
         33        SEND_VAR                                                 $25
         34        DO_ICALL                                         $26     
         35        ASSIGN                                                   !4, $26
   12    36        INIT_FCALL                                               'date'
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                         $29     
         39        FETCH_W                      local               $28     !4
         40        ASSIGN                                                   $28, $29
   14    41        INIT_FCALL                                               'var_dump'
         42        SEND_VAR                                                 !5
         43        DO_ICALL                                                 
   15    44        INIT_FCALL                                               'var_dump'
         45        SEND_VAR                                                 !6
         46        DO_ICALL                                                 
   16    47        INIT_FCALL                                               'var_dump'
         48        SEND_VAR                                                 !7
         49        DO_ICALL                                                 
   17    50        INIT_FCALL                                               'var_dump'
         51        SEND_VAR                                                 !8
         52        DO_ICALL                                                 
   18    53        INIT_FCALL                                               'var_dump'
         54        SEND_VAR                                                 !9
         55        DO_ICALL                                                 
   19    56        INIT_FCALL                                               'var_dump'
         57        SEND_VAR                                                 !10
         58        DO_ICALL                                                 
   20    59        INIT_FCALL                                               'var_dump'
         60        SEND_VAR                                                 !11
         61        DO_ICALL                                                 
         62      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
226.74 ms | 945 KiB | 24 Q