3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.72 ms | 1396 KiB | 15 Q