3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * Base: https://github.com/shikorism/tissue/blob/4ab82ff0e28b7cf23de5739a858cda723e161df0/app/Http/Controllers/UserController.php#L104-L109 */ date_default_timezone_set('Asia/Tokyo'); $d = new DateTime("2019-01-29 00:00:00"); $d->modify("-11 months"); $d->modify("first day of this month"); for ($i = 0; $i < 12; $i++) { echo $d->format("Y/m"), PHP_EOL; $d->modify("+1 month"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 15
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 15
Branch analysis from position: 26
Branch analysis from position: 15
filename:       /in/4s6e1
function name:  (null)
number of ops:  27
compiled vars:  !0 = $d, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Asia%2FTokyo'
          2        DO_ICALL                                                 
    9     3        NEW                                              $3      'DateTime'
          4        SEND_VAL_EX                                              '2019-01-29+00%3A00%3A00'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
   10     7        INIT_METHOD_CALL                                         !0, 'modify'
          8        SEND_VAL_EX                                              '-11+months'
          9        DO_FCALL                                      0          
   11    10        INIT_METHOD_CALL                                         !0, 'modify'
         11        SEND_VAL_EX                                              'first+day+of+this+month'
         12        DO_FCALL                                      0          
   13    13        ASSIGN                                                   !1, 0
         14      > JMP                                                      ->24
   14    15    >   INIT_METHOD_CALL                                         !0, 'format'
         16        SEND_VAL_EX                                              'Y%2Fm'
         17        DO_FCALL                                      0  $9      
         18        ECHO                                                     $9
         19        ECHO                                                     '%0A'
   15    20        INIT_METHOD_CALL                                         !0, 'modify'
         21        SEND_VAL_EX                                              '%2B1+month'
         22        DO_FCALL                                      0          
   13    23        PRE_INC                                                  !1
         24    >   IS_SMALLER                                               !1, 12
         25      > JMPNZ                                                    ~12, ->15
   16    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.89 ms | 1010 KiB | 14 Q