3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateFrom = new DateTime('25-02-2013'); $dateTo = new DateTime("26-03-2013"); $date = $dateFrom; $result = array(); while ($dateFrom != $dateTo) { $result[] = $date->format("d-m-Y"); $date->modify('+1 day'); } print_r($result);
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 = 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
Branch analysis from position: 11
filename:       /in/fJIVh
function name:  (null)
number of ops:  25
compiled vars:  !0 = $dateFrom, !1 = $dateTo, !2 = $date, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DateTime'
          1        SEND_VAL_EX                                              '25-02-2013'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    3     4        NEW                                              $7      'DateTime'
          5        SEND_VAL_EX                                              '26-03-2013'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
    4     8        ASSIGN                                                   !2, !0
    5     9        ASSIGN                                                   !3, <array>
    7    10      > JMP                                                      ->19
    8    11    >   INIT_METHOD_CALL                                         !2, 'format'
         12        SEND_VAL_EX                                              'd-m-Y'
         13        DO_FCALL                                      0  $13     
         14        ASSIGN_DIM                                               !3
         15        OP_DATA                                                  $13
    9    16        INIT_METHOD_CALL                                         !2, 'modify'
         17        SEND_VAL_EX                                              '%2B1+day'
         18        DO_FCALL                                      0          
    7    19    >   IS_NOT_EQUAL                                             !0, !1
         20      > JMPNZ                                                    ~15, ->11
   11    21    >   INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.42 ms | 1395 KiB | 15 Q