3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.34 ms | 1400 KiB | 21 Q