3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (class_exists('DateTime')) { $date = new DateTime('2013-10-31'); $date->modify('-1 month'); printf("2013-10-31, -1 month: %s\n", $date->format('m')); $date = new DateTime('2013-10-31'); $date->modify('first day of 1 month ago'); printf("2013-10-31, first day 1 month ago: %s\n", $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 = 33
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m5OQ9
function name:  (null)
number of ops:  35
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, ->33
    4     4    >   NEW                                              $2      'DateTime'
          5        SEND_VAL_EX                                              '2013-10-31'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
    5     8        INIT_METHOD_CALL                                         !0, 'modify'
          9        SEND_VAL_EX                                              '-1+month'
         10        DO_FCALL                                      0          
    6    11        INIT_FCALL                                               'printf'
         12        SEND_VAL                                                 '2013-10-31%2C+-1+month%3A+%25s%0A'
         13        INIT_METHOD_CALL                                         !0, 'format'
         14        SEND_VAL_EX                                              'm'
         15        DO_FCALL                                      0  $6      
         16        SEND_VAR                                                 $6
         17        DO_ICALL                                                 
    7    18        NEW                                              $8      'DateTime'
         19        SEND_VAL_EX                                              '2013-10-31'
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !0, $8
    8    22        INIT_METHOD_CALL                                         !0, 'modify'
         23        SEND_VAL_EX                                              'first+day+of+1+month+ago'
         24        DO_FCALL                                      0          
    9    25        INIT_FCALL                                               'printf'
         26        SEND_VAL                                                 '2013-10-31%2C+first+day+1+month+ago%3A+%25s%0A'
         27        INIT_METHOD_CALL                                         !0, 'format'
         28        SEND_VAL_EX                                              'm'
         29        DO_FCALL                                      0  $12     
         30        SEND_VAR                                                 $12
         31        DO_ICALL                                                 
         32      > JMP                                                      ->34
   11    33    >   ECHO                                                     'Not+supported.'
   12    34    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.39 ms | 1388 KiB | 17 Q