3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new DateTime("@1351382400"); var_dump($date1->format('c')); // Sun Oct 28 2012 00:00:00+00:00 var_dump($date1->getTimestamp()); //prints: 1351382400 $date1->setTimezone(new DateTimeZone("Europe/Stockholm")); var_dump($date1->format('U')); // prints: 1351382400 var_dump($date1->getTimestamp()); //prints: 1351386000
based on pts6t
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cVRBI
function name:  (null)
number of ops:  33
compiled vars:  !0 = $date1
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NEW                                              $1      :61
         1        SEND_VAL_EX                                              '%401351382400'
         2        DO_FCALL                                      0          
         3        QM_ASSIGN                                                !0
   4     4        INIT_FCALL                                               'var_dump'
         5        INIT_METHOD_CALL                                         !0, 'format'
         6        SEND_VAL_EX                                              'c'
         7        DO_FCALL                                      0  $4      
         8        SEND_VAR                                                 $4
         9        DO_ICALL                                                 
   5    10        INIT_FCALL                                               'var_dump'
        11        INIT_METHOD_CALL                                         !0, 'getTimestamp'
        12        DO_FCALL                                      0  $6      
        13        SEND_VAR                                                 $6
        14        DO_ICALL                                                 
   6    15        INIT_METHOD_CALL                                         !0, 'setTimezone'
        16        NEW                                              $8      :41
        17        SEND_VAL_EX                                              'Europe%2FStockholm'
        18        DO_FCALL                                      0          
        19        SEND_VAR_NO_REF_EX                                       $8
        20        DO_FCALL                                      0          
   7    21        INIT_FCALL                                               'var_dump'
        22        INIT_METHOD_CALL                                         !0, 'format'
        23        SEND_VAL_EX                                              'U'
        24        DO_FCALL                                      0  $11     
        25        SEND_VAR                                                 $11
        26        DO_ICALL                                                 
   8    27        INIT_FCALL                                               'var_dump'
        28        INIT_METHOD_CALL                                         !0, 'getTimestamp'
        29        DO_FCALL                                      0  $13     
        30        SEND_VAR                                                 $13
        31        DO_ICALL                                                 
        32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.4.0