3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start_date = "2016-06-22"; $end_date = "2016-07-11"; $diff = strtotime($end_date) - strtotime($start_date); $diff_date = date("d",$diff); $arr = []; for($i = 0; $i < $diff_date; $i++){ $arr[] = date('d',strtotime("$start_date +$i days")); } print_R($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 18
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 18
Branch analysis from position: 34
Branch analysis from position: 18
filename:       /in/BpMhC
function name:  (null)
number of ops:  38
compiled vars:  !0 = $start_date, !1 = $end_date, !2 = $diff, !3 = $diff_date, !4 = $arr, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2016-06-22'
    4     1        ASSIGN                                                   !1, '2016-07-11'
    6     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $8      
          5        INIT_FCALL                                               'strtotime'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $9      
          8        SUB                                              ~10     $8, $9
          9        ASSIGN                                                   !2, ~10
    7    10        INIT_FCALL                                               'date'
         11        SEND_VAL                                                 'd'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !3, $12
    8    15        ASSIGN                                                   !4, <array>
    9    16        ASSIGN                                                   !5, 0
         17      > JMP                                                      ->32
   10    18    >   INIT_FCALL                                               'date'
         19        SEND_VAL                                                 'd'
         20        INIT_FCALL                                               'strtotime'
         21        ROPE_INIT                                     4  ~18     !0
         22        ROPE_ADD                                      1  ~18     ~18, '+%2B'
         23        ROPE_ADD                                      2  ~18     ~18, !5
         24        ROPE_END                                      3  ~17     ~18, '+days'
         25        SEND_VAL                                                 ~17
         26        DO_ICALL                                         $20     
         27        SEND_VAR                                                 $20
         28        DO_ICALL                                         $21     
         29        ASSIGN_DIM                                               !4
         30        OP_DATA                                                  $21
    9    31        PRE_INC                                                  !5
         32    >   IS_SMALLER                                               !5, !3
         33      > JMPNZ                                                    ~23, ->18
   13    34    >   INIT_FCALL                                               'print_r'
         35        SEND_VAR                                                 !4
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.17 ms | 1001 KiB | 16 Q