3v4l.org

run code in 300+ PHP versions simultaneously
<?php $format = 'd/m/Y'; foreach (range(1, 7) as $number) { $difference = strtotime('+' . $number . ' days'); $day = strtolower(date('l', $difference)); var_dump($day); $$day = $difference; } $todayName = 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 = 27
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 27
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/tvsWG
function name:  (null)
number of ops:  59
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, ->27
          6    > > FE_FETCH_R                                               $14, !1, ->27
    6     7    >   INIT_FCALL                                               'strtotime'
          8        CONCAT                                           ~15     '%2B', !1
          9        CONCAT                                           ~16     ~15, '+days'
         10        SEND_VAL                                                 ~16
         11        DO_ICALL                                         $17     
         12        ASSIGN                                                   !2, $17
    7    13        INIT_FCALL                                               'strtolower'
         14        INIT_FCALL                                               'date'
         15        SEND_VAL                                                 'l'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $19     
         18        SEND_VAR                                                 $19
         19        DO_ICALL                                         $20     
         20        ASSIGN                                                   !3, $20
    8    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
    9    24        FETCH_W                      local               $23     !3
         25        ASSIGN                                                   $23, !2
    5    26      > JMP                                                      ->6
         27    >   FE_FREE                                                  $14
   12    28        INIT_FCALL                                               'date'
         29        SEND_VAL                                                 'l'
         30        DO_ICALL                                         $25     
         31        ASSIGN                                                   !4, $25
   13    32        INIT_FCALL                                               'date'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                         $28     
         35        FETCH_W                      local               $27     !4
         36        ASSIGN                                                   $27, $28
   15    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !5
         39        DO_ICALL                                                 
   16    40        INIT_FCALL                                               'var_dump'
         41        SEND_VAR                                                 !6
         42        DO_ICALL                                                 
   17    43        INIT_FCALL                                               'var_dump'
         44        SEND_VAR                                                 !7
         45        DO_ICALL                                                 
   18    46        INIT_FCALL                                               'var_dump'
         47        SEND_VAR                                                 !8
         48        DO_ICALL                                                 
   19    49        INIT_FCALL                                               'var_dump'
         50        SEND_VAR                                                 !9
         51        DO_ICALL                                                 
   20    52        INIT_FCALL                                               'var_dump'
         53        SEND_VAR                                                 !10
         54        DO_ICALL                                                 
   21    55        INIT_FCALL                                               'var_dump'
         56        SEND_VAR                                                 !11
         57        DO_ICALL                                                 
         58      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.04 ms | 1392 KiB | 23 Q