3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTimeImmutable('2012-01-01'); $end = new DateTimeImmutable('2014-12-31'); while($start <= $end) { $nextdate = $start->modify('+1 month'); $prevdate = $start->modify('-1 month'); echo $prevdate->format('Y-m-d').'<br>'; echo $nextdate->format('Y-m-d').'<br>'; $start = $nextdate; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 9
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 9
Branch analysis from position: 30
Branch analysis from position: 9
filename:       /in/iY6UL
function name:  (null)
number of ops:  31
compiled vars:  !0 = $start, !1 = $end, !2 = $nextdate, !3 = $prevdate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DateTimeImmutable'
          1        SEND_VAL_EX                                              '2012-01-01'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    3     4        NEW                                              $7      'DateTimeImmutable'
          5        SEND_VAL_EX                                              '2014-12-31'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
    4     8      > JMP                                                      ->28
    5     9    >   INIT_METHOD_CALL                                         !0, 'modify'
         10        SEND_VAL_EX                                              '%2B1+month'
         11        DO_FCALL                                      0  $10     
         12        ASSIGN                                                   !2, $10
    6    13        INIT_METHOD_CALL                                         !0, 'modify'
         14        SEND_VAL_EX                                              '-1+month'
         15        DO_FCALL                                      0  $12     
         16        ASSIGN                                                   !3, $12
    7    17        INIT_METHOD_CALL                                         !3, 'format'
         18        SEND_VAL_EX                                              'Y-m-d'
         19        DO_FCALL                                      0  $14     
         20        CONCAT                                           ~15     $14, '%3Cbr%3E'
         21        ECHO                                                     ~15
    8    22        INIT_METHOD_CALL                                         !2, 'format'
         23        SEND_VAL_EX                                              'Y-m-d'
         24        DO_FCALL                                      0  $16     
         25        CONCAT                                           ~17     $16, '%3Cbr%3E'
         26        ECHO                                                     ~17
    9    27        ASSIGN                                                   !0, !2
    4    28    >   IS_SMALLER_OR_EQUAL                                      !0, !1
         29      > JMPNZ                                                    ~19, ->9
   10    30    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.63 ms | 1395 KiB | 13 Q