3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.31 ms | 1395 KiB | 21 Q