3v4l.org

run code in 500+ PHP versions simultaneously
<?php if (class_exists('DateTime')) { date_default_timezone_set('Europe/Berlin'); $datetime = new DateTime('2016-01-01 23:59:59'); $datetime->setDate(2016, 2, 28); print_r($datetime); } else { echo 'DateTime not supported yet'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 18
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nPsle
function name:  (null)
number of ops:  20
compiled vars:  !0 = $datetime
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FRAMELESS_ICALL_1                class_exists        ~1      'DateTime'
          1      > JMPZ                                                         ~1, ->18
    4     2    >   INIT_FCALL                                                   'date_default_timezone_set'
          3        SEND_VAL                                                     'Europe%2FBerlin'
          4        DO_ICALL                                                     
    6     5        NEW                                                  $3      'DateTime'
          6        SEND_VAL_EX                                                  '2016-01-01+23%3A59%3A59'
          7        DO_FCALL                                          0          
          8        ASSIGN                                                       !0, $3
    7     9        INIT_METHOD_CALL                                             !0, 'setDate'
         10        SEND_VAL_EX                                                  2016
         11        SEND_VAL_EX                                                  2
         12        SEND_VAL_EX                                                  28
         13        DO_FCALL                                          0          
    8    14        INIT_FCALL                                                   'print_r'
         15        SEND_VAR                                                     !0
         16        DO_ICALL                                                     
    3    17      > JMP                                                          ->19
   11    18    >   ECHO                                                         'DateTime+not+supported+yet'
   12    19    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
146.19 ms | 2787 KiB | 15 Q