3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (class_exists('DateTime')) { $date = new DateTime('2013-10-31'); //$date->sub(DateInterval::createFromDateString('1 month')); $date->sub(new DateInterval('P1M')); print $date->format('m'); } else { print 'Not supported.'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JsD7n
function name:  (null)
number of ops:  21
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'class_exists'
          1        SEND_VAL                                                 'DateTime'
          2        DO_ICALL                                         $1      
          3      > JMPZ                                                     $1, ->19
    4     4    >   NEW                                              $2      'DateTime'
          5        SEND_VAL_EX                                              '2013-10-31'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
    6     8        INIT_METHOD_CALL                                         !0, 'sub'
          9        NEW                                              $5      'DateInterval'
         10        SEND_VAL_EX                                              'P1M'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $5
         13        DO_FCALL                                      0          
    7    14        INIT_METHOD_CALL                                         !0, 'format'
         15        SEND_VAL_EX                                              'm'
         16        DO_FCALL                                      0  $8      
         17        ECHO                                                     $8
         18      > JMP                                                      ->20
    9    19    >   ECHO                                                     'Not+supported.'
   10    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.62 ms | 1386 KiB | 15 Q