3v4l.org

run code in 300+ PHP versions simultaneously
<?php $weekDate = new DateTime('- 1 week'); echo $weekDate->format('Y-m-d')."\n"; for($i=0;$i<8;$i++) { $future = new DateTime('+ '.$i.' days'); echo $future->format('Y-m-d')."\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 11
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 11
Branch analysis from position: 25
Branch analysis from position: 11
filename:       /in/3IQ6b
function name:  (null)
number of ops:  26
compiled vars:  !0 = $weekDate, !1 = $i, !2 = $future
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '-+1+week'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    3     4        INIT_METHOD_CALL                                         !0, 'format'
          5        SEND_VAL_EX                                              'Y-m-d'
          6        DO_FCALL                                      0  $6      
          7        CONCAT                                           ~7      $6, '%0A'
          8        ECHO                                                     ~7
    5     9        ASSIGN                                                   !1, 0
         10      > JMP                                                      ->23
    6    11    >   NEW                                              $9      'DateTime'
         12        CONCAT                                           ~10     '%2B+', !1
         13        CONCAT                                           ~11     ~10, '+days'
         14        SEND_VAL_EX                                              ~11
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !2, $9
    7    17        INIT_METHOD_CALL                                         !2, 'format'
         18        SEND_VAL_EX                                              'Y-m-d'
         19        DO_FCALL                                      0  $14     
         20        CONCAT                                           ~15     $14, '%0A'
         21        ECHO                                                     ~15
    5    22        PRE_INC                                                  !1
         23    >   IS_SMALLER                                               !1, 8
         24      > JMPNZ                                                    ~17, ->11
    8    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.05 ms | 1394 KiB | 13 Q