3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.87 ms | 1448 KiB | 13 Q