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('N', $difference)); $$day = $difference; } $todayName = date('N'); $$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 = 24
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 24
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/Rooll
function name:  (null)
number of ops:  56
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, ->24
          6    > > FE_FETCH_R                                               $14, !1, ->24
    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                                                 'N'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $19     
         18        SEND_VAR                                                 $19
         19        DO_ICALL                                         $20     
         20        ASSIGN                                                   !3, $20
    9    21        FETCH_W                      local               $22     !3
         22        ASSIGN                                                   $22, !2
    5    23      > JMP                                                      ->6
         24    >   FE_FREE                                                  $14
   12    25        INIT_FCALL                                               'date'
         26        SEND_VAL                                                 'N'
         27        DO_ICALL                                         $24     
         28        ASSIGN                                                   !4, $24
   13    29        INIT_FCALL                                               'date'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                         $27     
         32        FETCH_W                      local               $26     !4
         33        ASSIGN                                                   $26, $27
   15    34        INIT_FCALL                                               'var_dump'
         35        SEND_VAR                                                 !5
         36        DO_ICALL                                                 
   16    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !6
         39        DO_ICALL                                                 
   17    40        INIT_FCALL                                               'var_dump'
         41        SEND_VAR                                                 !7
         42        DO_ICALL                                                 
   18    43        INIT_FCALL                                               'var_dump'
         44        SEND_VAR                                                 !8
         45        DO_ICALL                                                 
   19    46        INIT_FCALL                                               'var_dump'
         47        SEND_VAR                                                 !9
         48        DO_ICALL                                                 
   20    49        INIT_FCALL                                               'var_dump'
         50        SEND_VAR                                                 !10
         51        DO_ICALL                                                 
   21    52        INIT_FCALL                                               'var_dump'
         53        SEND_VAR                                                 !11
         54        DO_ICALL                                                 
         55      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.81 ms | 1400 KiB | 23 Q