3v4l.org

run code in 500+ PHP versions simultaneously
<?php $vBillMonthPrev = '11'; $vBillYearPrev = (int)date('Y') - ((int)$vBillMonthPrev > (int)date('n') ? 1 : 0); $date = date_create_from_format('U', mktime(0, 0, 0, $vBillMonthPrev, 15, $vBillYearPrev)); $m_array = array(); for ($i = 1; $i < 7; $i++) { $date->modify('-1 month'); $m_array[] = $date->format('M-y'); } print_r($m_array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 33
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 33
Branch analysis from position: 44
Branch analysis from position: 33
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
filename:       /in/FST4C
function name:  (null)
number of ops:  48
compiled vars:  !0 = $vBillMonthPrev, !1 = $vBillYearPrev, !2 = $date, !3 = $m_array, !4 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '11'
    4     1        INIT_FCALL                                                   'date'
          2        SEND_VAL                                                     'Y'
          3        DO_ICALL                                             $6      
          4        CAST                                              4  ~7      $6
          5        CAST                                              4  ~8      !0
          6        INIT_FCALL                                                   'date'
          7        SEND_VAL                                                     'n'
          8        DO_ICALL                                             $9      
          9        CAST                                              4  ~10     $9
         10        IS_SMALLER                                                   ~10, ~8
         11      > JMPZ                                                         ~11, ->14
         12    >   QM_ASSIGN                                            ~12     1
         13      > JMP                                                          ->15
         14    >   QM_ASSIGN                                            ~12     0
         15    >   SUB                                                  ~13     ~7, ~12
         16        ASSIGN                                                       !1, ~13
    6    17        INIT_FCALL                                                   'date_create_from_format'
         18        SEND_VAL                                                     'U'
         19        INIT_FCALL                                                   'mktime'
         20        SEND_VAL                                                     0
         21        SEND_VAL                                                     0
         22        SEND_VAL                                                     0
         23        SEND_VAR                                                     !0
         24        SEND_VAL                                                     15
         25        SEND_VAR                                                     !1
         26        DO_ICALL                                             $15     
         27        SEND_VAR                                                     $15
         28        DO_ICALL                                             $16     
         29        ASSIGN                                                       !2, $16
    8    30        ASSIGN                                                       !3, <array>
    9    31        ASSIGN                                                       !4, 1
         32      > JMP                                                          ->42
   10    33    >   INIT_METHOD_CALL                                             !2, 'modify'
         34        SEND_VAL_EX                                                  '-1+month'
         35        DO_FCALL                                          0          
   11    36        INIT_METHOD_CALL                                             !2, 'format'
         37        SEND_VAL_EX                                                  'M-y'
         38        DO_FCALL                                          0  $22     
         39        ASSIGN_DIM                                                   !3
         40        OP_DATA                                                      $22
    9    41        PRE_INC                                                      !4
         42    >   IS_SMALLER                                                   !4, 7
         43      > JMPNZ                                                        ~24, ->33
   14    44    >   INIT_FCALL                                                   'print_r'
         45        SEND_VAR                                                     !3
         46        DO_ICALL                                                     
         47      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.6 ms | 1997 KiB | 17 Q