3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (function_exists("date_default_timezone_set")) date_default_timezone_set('Europe/Moscow'); echo date( "Y-m-d",strtotime('2014-01-31 +1 month')); echo "\n"; $date = new DateTime('2014-01-31'); $date->modify('+1 month'); echo $date->format('Y-m-d');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/DkgI8
function name:  (null)
number of ops:  28
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'date_default_timezone_set'
          2        DO_ICALL                                         $1      
          3      > JMPZ                                                     $1, ->7
          4    >   INIT_FCALL                                               'date_default_timezone_set'
          5        SEND_VAL                                                 'Europe%2FMoscow'
          6        DO_ICALL                                                 
    3     7    >   INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'Y-m-d'
          9        INIT_FCALL                                               'strtotime'
         10        SEND_VAL                                                 '2014-01-31+%2B1+month'
         11        DO_ICALL                                         $3      
         12        SEND_VAR                                                 $3
         13        DO_ICALL                                         $4      
         14        ECHO                                                     $4
    4    15        ECHO                                                     '%0A'
    5    16        NEW                                              $5      'DateTime'
         17        SEND_VAL_EX                                              '2014-01-31'
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !0, $5
    6    20        INIT_METHOD_CALL                                         !0, 'modify'
         21        SEND_VAL_EX                                              '%2B1+month'
         22        DO_FCALL                                      0          
    7    23        INIT_METHOD_CALL                                         !0, 'format'
         24        SEND_VAL_EX                                              'Y-m-d'
         25        DO_FCALL                                      0  $9      
         26        ECHO                                                     $9
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.2 ms | 1399 KiB | 21 Q