3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sdate = "2017-06-19"; $edate = "2017-08-21"; $ts1 = strtotime($sdate); $ts2 = strtotime($edate); $year1 = date('Y', $ts1); $year2 = date('Y', $ts2); $month1 = date('m', $ts1); $month2 = date('m', $ts2); $diff = (($year2 - $year1) * 12) + ($month2 - $month1); echo $diff; $Tickets = array($sdate); var_dump($Tickets); for($i=1; $i<=$diff; $i++) { $time = strtotime($sdate); $final = date("Y-m-d", strtotime("+1 month", $time)); echo $final ."\n"; //$sql = mysqli_query($con, "SUPPORT REQUEST QUERY"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 61, Position 2 = 43
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 61, Position 2 = 43
Branch analysis from position: 61
Branch analysis from position: 43
filename:       /in/qZGa6
function name:  (null)
number of ops:  62
compiled vars:  !0 = $sdate, !1 = $edate, !2 = $ts1, !3 = $ts2, !4 = $year1, !5 = $year2, !6 = $month1, !7 = $month2, !8 = $diff, !9 = $Tickets, !10 = $i, !11 = $time, !12 = $final
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2017-06-19'
    3     1        ASSIGN                                                   !1, '2017-08-21'
    5     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $15     
          5        ASSIGN                                                   !2, $15
    6     6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $17     
          9        ASSIGN                                                   !3, $17
    7    10        INIT_FCALL                                               'date'
         11        SEND_VAL                                                 'Y'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $19     
         14        ASSIGN                                                   !4, $19
    8    15        INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'Y'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $21     
         19        ASSIGN                                                   !5, $21
    9    20        INIT_FCALL                                               'date'
         21        SEND_VAL                                                 'm'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $23     
         24        ASSIGN                                                   !6, $23
   10    25        INIT_FCALL                                               'date'
         26        SEND_VAL                                                 'm'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                         $25     
         29        ASSIGN                                                   !7, $25
   12    30        SUB                                              ~27     !5, !4
         31        MUL                                              ~28     ~27, 12
         32        SUB                                              ~29     !7, !6
         33        ADD                                              ~30     ~28, ~29
         34        ASSIGN                                                   !8, ~30
   13    35        ECHO                                                     !8
   14    36        INIT_ARRAY                                       ~32     !0
         37        ASSIGN                                                   !9, ~32
   15    38        INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !9
         40        DO_ICALL                                                 
   16    41        ASSIGN                                                   !10, 1
         42      > JMP                                                      ->59
   20    43    >   INIT_FCALL                                               'strtotime'
         44        SEND_VAR                                                 !0
         45        DO_ICALL                                         $36     
         46        ASSIGN                                                   !11, $36
   21    47        INIT_FCALL                                               'date'
         48        SEND_VAL                                                 'Y-m-d'
         49        INIT_FCALL                                               'strtotime'
         50        SEND_VAL                                                 '%2B1+month'
         51        SEND_VAR                                                 !11
         52        DO_ICALL                                         $38     
         53        SEND_VAR                                                 $38
         54        DO_ICALL                                         $39     
         55        ASSIGN                                                   !12, $39
   22    56        CONCAT                                           ~41     !12, '%0A'
         57        ECHO                                                     ~41
   16    58        PRE_INC                                                  !10
         59    >   IS_SMALLER_OR_EQUAL                                      !10, !8
         60      > JMPNZ                                                    ~43, ->43
   24    61    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.65 ms | 1400 KiB | 19 Q