3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('2008-12-31 00:00'); $end = new DateTime('2009-02-01 00:00'); $point = $start; while($point <= $end){ echo $point->format('YW') . "\n"; $point = $point->modify('next week'); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 10
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 10
Branch analysis from position: 21
Branch analysis from position: 10
filename:       /in/JuFdQ
function name:  (null)
number of ops:  22
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-31+00%3A00'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '2009-02-01+00%3A00'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    5     8        ASSIGN                                                   !2, !0
    7     9      > JMP                                                      ->19
    8    10    >   INIT_METHOD_CALL                                         !2, 'format'
         11        SEND_VAL_EX                                              'YW'
         12        DO_FCALL                                      0  $10     
         13        CONCAT                                           ~11     $10, '%0A'
         14        ECHO                                                     ~11
    9    15        INIT_METHOD_CALL                                         !2, 'modify'
         16        SEND_VAL_EX                                              'next+week'
         17        DO_FCALL                                      0  $12     
         18        ASSIGN                                                   !2, $12
    7    19    >   IS_SMALLER_OR_EQUAL                                      !2, !1
         20      > JMPNZ                                                    ~14, ->10
   10    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.6 ms | 1394 KiB | 13 Q