3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('2015-04-20'); $end = new DateTime('2015-04-23'); $interval = new DateInterval('P1D'); // interval 1 hari $now = $start; while ($now <= $end) { echo $now->format('y-m-d'), PHP_EOL; $now->add($interval); // tambah 1 hari }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 14
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 14
Branch analysis from position: 24
Branch analysis from position: 14
filename:       /in/naA2N
function name:  (null)
number of ops:  25
compiled vars:  !0 = $start, !1 = $end, !2 = $interval, !3 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DateTime'
          1        SEND_VAL_EX                                              '2015-04-20'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    4     4        NEW                                              $7      'DateTime'
          5        SEND_VAL_EX                                              '2015-04-23'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
    5     8        NEW                                              $10     'DateInterval'
          9        SEND_VAL_EX                                              'P1D'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $10
    7    12        ASSIGN                                                   !3, !0
    8    13      > JMP                                                      ->22
    9    14    >   INIT_METHOD_CALL                                         !3, 'format'
         15        SEND_VAL_EX                                              'y-m-d'
         16        DO_FCALL                                      0  $14     
         17        ECHO                                                     $14
         18        ECHO                                                     '%0A'
   11    19        INIT_METHOD_CALL                                         !3, 'add'
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0          
    8    22    >   IS_SMALLER_OR_EQUAL                                      !3, !1
         23      > JMPNZ                                                    ~16, ->14
   12    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.82 ms | 1394 KiB | 13 Q