3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('2013-11-07'); $end = new DateTime('2013-12-31'); while ($start < $end) { $weeks[] = $start->format('d-m-Y'); $start->modify('+1 week'); } print_r($weeks);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 9
Branch analysis from position: 19
Branch analysis from position: 9
filename:       /in/BHjGb
function name:  (null)
number of ops:  23
compiled vars:  !0 = $start, !1 = $end, !2 = $weeks
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '2013-11-07'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    3     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '2013-12-31'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    5     8      > JMP                                                      ->17
    6     9    >   INIT_METHOD_CALL                                         !0, 'format'
         10        SEND_VAL_EX                                              'd-m-Y'
         11        DO_FCALL                                      0  $10     
         12        ASSIGN_DIM                                               !2
         13        OP_DATA                                                  $10
    7    14        INIT_METHOD_CALL                                         !0, 'modify'
         15        SEND_VAL_EX                                              '%2B1+week'
         16        DO_FCALL                                      0          
    5    17    >   IS_SMALLER                                               !0, !1
         18      > JMPNZ                                                    ~12, ->9
   10    19    >   INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.49 ms | 1395 KiB | 15 Q