3v4l.org

run code in 300+ PHP versions simultaneously
<?php $end = new \DateTime(); $end->sub(new \DateInterval('P30D')); $begin= new \DateTime(); $interval = \DateInterval::createFromDateString('1 day'); $now = new DateTime; while ($begin >= $end) { print_r($begin->format('Y-m-d')); $begin = $begin->sub($interval); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 20
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 20
Branch analysis from position: 32
Branch analysis from position: 20
filename:       /in/HohKU
function name:  (null)
number of ops:  33
compiled vars:  !0 = $end, !1 = $begin, !2 = $interval, !3 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        INIT_METHOD_CALL                                         !0, 'sub'
          4        NEW                                              $7      'DateInterval'
          5        SEND_VAL_EX                                              'P30D'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $7
          8        DO_FCALL                                      0          
    6     9        NEW                                              $10     'DateTime'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $10
    8    12        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
         13        SEND_VAL                                                 '1+day'
         14        DO_FCALL                                      0  $13     
         15        ASSIGN                                                   !2, $13
   10    16        NEW                                              $15     'DateTime'
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !3, $15
   11    19      > JMP                                                      ->30
   12    20    >   INIT_FCALL                                               'print_r'
         21        INIT_METHOD_CALL                                         !1, 'format'
         22        SEND_VAL_EX                                              'Y-m-d'
         23        DO_FCALL                                      0  $18     
         24        SEND_VAR                                                 $18
         25        DO_ICALL                                                 
   13    26        INIT_METHOD_CALL                                         !1, 'sub'
         27        SEND_VAR_EX                                              !2
         28        DO_FCALL                                      0  $20     
         29        ASSIGN                                                   !1, $20
   11    30    >   IS_SMALLER_OR_EQUAL                                      !0, !1
         31      > JMPNZ                                                    ~22, ->20
   14    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.79 ms | 1396 KiB | 15 Q