3v4l.org

run code in 300+ PHP versions simultaneously
<?php $end = "Wed Oct 22 2014 05:30:00 GMT+0530 (IST)"; $start = "Tue Oct 14 2014 05:30:00 GMT+0530 (IST)"; //$date = new DateTime("Wed Oct 22 2014 05:30:00 GMT+0530 (IST)"); //echo $date->format('Ymd H:i:s'); //$start = date_create(date('Y-m-d H:i:s', strtotime($start))); //$end = date_create(date('Y-m-d H:i:s', strtotime($end))); $start = new DateTime($start); $end = new DateTime($end); $interval = $start->diff($end); $j = $interval->format('%a'); echo $j; for($i=0; $i < $interval->format('%a')+1; $i++){ echo $start->format('d/m/Y#'); $start = $start->add(new DateInterval('P1D')); } //echo $interval->format('%R%a days');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 21
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 21
Branch analysis from position: 39
Branch analysis from position: 21
filename:       /in/CJoVl
function name:  (null)
number of ops:  40
compiled vars:  !0 = $end, !1 = $start, !2 = $interval, !3 = $j, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Wed+Oct+22+2014+05%3A30%3A00+GMT%2B0530+%28IST%29'
    3     1        ASSIGN                                                   !1, 'Tue+Oct+14+2014+05%3A30%3A00+GMT%2B0530+%28IST%29'
   12     2        NEW                                              $7      'DateTime'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $7
   13     6        NEW                                              $10     'DateTime'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $10
   15    10        INIT_METHOD_CALL                                         !1, 'diff'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $13     
         13        ASSIGN                                                   !2, $13
   17    14        INIT_METHOD_CALL                                         !2, 'format'
         15        SEND_VAL_EX                                              '%25a'
         16        DO_FCALL                                      0  $15     
         17        ASSIGN                                                   !3, $15
   18    18        ECHO                                                     !3
   20    19        ASSIGN                                                   !4, 0
         20      > JMP                                                      ->33
   22    21    >   INIT_METHOD_CALL                                         !1, 'format'
         22        SEND_VAL_EX                                              'd%2Fm%2FY%23'
         23        DO_FCALL                                      0  $18     
         24        ECHO                                                     $18
   23    25        INIT_METHOD_CALL                                         !1, 'add'
         26        NEW                                              $19     'DateInterval'
         27        SEND_VAL_EX                                              'P1D'
         28        DO_FCALL                                      0          
         29        SEND_VAR_NO_REF_EX                                       $19
         30        DO_FCALL                                      0  $21     
         31        ASSIGN                                                   !1, $21
   20    32        PRE_INC                                                  !4
         33    >   INIT_METHOD_CALL                                         !2, 'format'
         34        SEND_VAL_EX                                              '%25a'
         35        DO_FCALL                                      0  $24     
         36        ADD                                              ~25     $24, 1
         37        IS_SMALLER                                               !4, ~25
         38      > JMPNZ                                                    ~26, ->21
   27    39    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.16 ms | 1399 KiB | 13 Q