3v4l.org

run code in 300+ 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 = 4, Position 2 = 20
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nPsle
function name:  (null)
number of ops:  22
compiled vars:  !0 = $datetime
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, ->20
    4     4    >   INIT_FCALL                                               'date_default_timezone_set'
          5        SEND_VAL                                                 'Europe%2FBerlin'
          6        DO_ICALL                                                 
    6     7        NEW                                              $3      'DateTime'
          8        SEND_VAL_EX                                              '2016-01-01+23%3A59%3A59'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !0, $3
    7    11        INIT_METHOD_CALL                                         !0, 'setDate'
         12        SEND_VAL_EX                                              2016
         13        SEND_VAL_EX                                              2
         14        SEND_VAL_EX                                              28
         15        DO_FCALL                                      0          
    8    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
    3    19      > JMP                                                      ->21
   11    20    >   ECHO                                                     'DateTime+not+supported+yet'
   12    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
288.68 ms | 1012 KiB | 16 Q