3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('2005-10-10', new DateTimeZone('PST')); var_dump($date->format('c')); //$date = new DateTime('2005-10-10', new DateTimeZone('PT')); var_dump($date->format('c')); $date = new DateTime('2005-10-10', new DateTimeZone('PDT')); var_dump($date->format('c')); $date = new DateTime('2005-10-10', new DateTimeZone('MT')); var_dump($date->format('c')); $date->setTimezone(new DateTimeZone('CET')); var_dump($date->format('c'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rdkun
function name:  (null)
number of ops:  61
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'DateTime'
          1        SEND_VAL_EX                                              '2005-10-10'
          2        NEW                                              $2      'DateTimeZone'
          3        SEND_VAL_EX                                              'PST'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $1
    4     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'format'
         10        SEND_VAL_EX                                              'c'
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
    6    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !0, 'format'
         16        SEND_VAL_EX                                              'c'
         17        DO_FCALL                                      0  $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
    7    20        NEW                                              $10     'DateTime'
         21        SEND_VAL_EX                                              '2005-10-10'
         22        NEW                                              $11     'DateTimeZone'
         23        SEND_VAL_EX                                              'PDT'
         24        DO_FCALL                                      0          
         25        SEND_VAR_NO_REF_EX                                       $11
         26        DO_FCALL                                      0          
         27        ASSIGN                                                   !0, $10
    8    28        INIT_FCALL                                               'var_dump'
         29        INIT_METHOD_CALL                                         !0, 'format'
         30        SEND_VAL_EX                                              'c'
         31        DO_FCALL                                      0  $15     
         32        SEND_VAR                                                 $15
         33        DO_ICALL                                                 
    9    34        NEW                                              $17     'DateTime'
         35        SEND_VAL_EX                                              '2005-10-10'
         36        NEW                                              $18     'DateTimeZone'
         37        SEND_VAL_EX                                              'MT'
         38        DO_FCALL                                      0          
         39        SEND_VAR_NO_REF_EX                                       $18
         40        DO_FCALL                                      0          
         41        ASSIGN                                                   !0, $17
   10    42        INIT_FCALL                                               'var_dump'
         43        INIT_METHOD_CALL                                         !0, 'format'
         44        SEND_VAL_EX                                              'c'
         45        DO_FCALL                                      0  $22     
         46        SEND_VAR                                                 $22
         47        DO_ICALL                                                 
   11    48        INIT_METHOD_CALL                                         !0, 'setTimezone'
         49        NEW                                              $24     'DateTimeZone'
         50        SEND_VAL_EX                                              'CET'
         51        DO_FCALL                                      0          
         52        SEND_VAR_NO_REF_EX                                       $24
         53        DO_FCALL                                      0          
   12    54        INIT_FCALL                                               'var_dump'
         55        INIT_METHOD_CALL                                         !0, 'format'
         56        SEND_VAL_EX                                              'c'
         57        DO_FCALL                                      0  $27     
         58        SEND_VAR                                                 $27
         59        DO_ICALL                                                 
         60      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.72 ms | 1456 KiB | 14 Q