3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 0; $i <= 12; $i++) { $months[] = date("m/Y", strtotime( date( 'Y-m-01' )." -$i months")); } print_r($months);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 2
Branch analysis from position: 21
Branch analysis from position: 2
filename:       /in/qCBYr
function name:  (null)
number of ops:  25
compiled vars:  !0 = $i, !1 = $months
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->19
    4     2    >   INIT_FCALL                                               'date'
          3        SEND_VAL                                                 'm%2FY'
          4        INIT_FCALL                                               'strtotime'
          5        INIT_FCALL                                               'date'
          6        SEND_VAL                                                 'Y-m-01'
          7        DO_ICALL                                         $4      
          8        ROPE_INIT                                     3  ~6      '+-'
          9        ROPE_ADD                                      1  ~6      ~6, !0
         10        ROPE_END                                      2  ~5      ~6, '+months'
         11        CONCAT                                           ~8      $4, ~5
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                         $9      
         14        SEND_VAR                                                 $9
         15        DO_ICALL                                         $10     
         16        ASSIGN_DIM                                               !1
         17        OP_DATA                                                  $10
    3    18        PRE_INC                                                  !0
         19    >   IS_SMALLER_OR_EQUAL                                      !0, 12
         20      > JMPNZ                                                    ~12, ->2
    6    21    >   INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.15 ms | 1395 KiB | 19 Q