3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.74 ms | 1395 KiB | 13 Q