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('+ 1 days'); echo $future->format('Y-m-d')."\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
Branch analysis from position: 11
filename:       /in/k745f
function name:  (null)
number of ops:  24
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                                                      ->21
    6    11    >   NEW                                              $9      'DateTime'
         12        SEND_VAL_EX                                              '%2B+1+days'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $9
    7    15        INIT_METHOD_CALL                                         !2, 'format'
         16        SEND_VAL_EX                                              'Y-m-d'
         17        DO_FCALL                                      0  $12     
         18        CONCAT                                           ~13     $12, '%0A'
         19        ECHO                                                     ~13
    5    20        PRE_INC                                                  !1
         21    >   IS_SMALLER                                               !1, 8
         22      > JMPNZ                                                    ~15, ->11
    8    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.8 ms | 1394 KiB | 13 Q