3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime('2018-10-31'); echo $date->format('Y-m-d').PHP_EOL; for ($i = 0; $i < 6; ++$i) { $date->modify('last day of next month'); echo $date->format('Y-m-d'); }
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 = 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
Branch analysis from position: 11
filename:       /in/rcbeN
function name:  (null)
number of ops:  22
compiled vars:  !0 = $date, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateTime'
          1        SEND_VAL_EX                                              '2018-10-31'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    4     4        INIT_METHOD_CALL                                         !0, 'format'
          5        SEND_VAL_EX                                              'Y-m-d'
          6        DO_FCALL                                      0  $5      
          7        CONCAT                                           ~6      $5, '%0A'
          8        ECHO                                                     ~6
    6     9        ASSIGN                                                   !1, 0
         10      > JMP                                                      ->19
    7    11    >   INIT_METHOD_CALL                                         !0, 'modify'
         12        SEND_VAL_EX                                              'last+day+of+next+month'
         13        DO_FCALL                                      0          
    8    14        INIT_METHOD_CALL                                         !0, 'format'
         15        SEND_VAL_EX                                              'Y-m-d'
         16        DO_FCALL                                      0  $9      
         17        ECHO                                                     $9
    6    18        PRE_INC                                                  !1
         19    >   IS_SMALLER                                               !1, 6
         20      > JMPNZ                                                    ~11, ->11
    9    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.55 ms | 1394 KiB | 13 Q