3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month = 12; #$_REQUEST['month']; $year = 2013; #$_REQUEST['year']; $date = new DateTime("$year-$month-1"); $date->modify('+1 month'); echo "Next month is: ", $date->format('Y-m');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DUQhW
function name:  (null)
number of ops:  19
compiled vars:  !0 = $month, !1 = $year, !2 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 12
    3     1        ASSIGN                                                   !1, 2013
    4     2        NEW                                              $5      'DateTime'
          3        ROPE_INIT                                     4  ~7      !1
          4        ROPE_ADD                                      1  ~7      ~7, '-'
          5        ROPE_ADD                                      2  ~7      ~7, !0
          6        ROPE_END                                      3  ~6      ~7, '-1'
          7        SEND_VAL_EX                                              ~6
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $5
    5    10        INIT_METHOD_CALL                                         !2, 'modify'
         11        SEND_VAL_EX                                              '%2B1+month'
         12        DO_FCALL                                      0          
    6    13        ECHO                                                     'Next+month+is%3A+'
         14        INIT_METHOD_CALL                                         !2, 'format'
         15        SEND_VAL_EX                                              'Y-m'
         16        DO_FCALL                                      0  $12     
         17        ECHO                                                     $12
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.64 ms | 1393 KiB | 13 Q