3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); echo date_default_timezone_get(), PHP_EOL; $utc = new DateTimeZone('UTC'); $time = DateTime::createFromFormat('Y-m-d H:i:s', '2014-05-19 11:30:00'); foreach (array('BST', 'Etc/GMT+1', 'GMT+1', 'CEST') as $abbr) { $time->setTimezone(new DateTimeZone($abbr)); echo "{$abbr}: {$time->format(DATE_RFC822)}", PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 33
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 33
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/jt49J
function name:  (null)
number of ops:  35
compiled vars:  !0 = $utc, !1 = $time, !2 = $abbr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'UTC'
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'date_default_timezone_get'
          4        DO_ICALL                                         $4      
          5        ECHO                                                     $4
          6        ECHO                                                     '%0A'
    6     7        NEW                                              $5      'DateTimeZone'
          8        SEND_VAL_EX                                              'UTC'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !0, $5
    7    11        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         12        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         13        SEND_VAL                                                 '2014-05-19+11%3A30%3A00'
         14        DO_FCALL                                      0  $8      
         15        ASSIGN                                                   !1, $8
    8    16      > FE_RESET_R                                       $10     <array>, ->33
         17    > > FE_FETCH_R                                               $10, !2, ->33
    9    18    >   INIT_METHOD_CALL                                         !1, 'setTimezone'
         19        NEW                                              $11     'DateTimeZone'
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0          
         22        SEND_VAR_NO_REF_EX                                       $11
         23        DO_FCALL                                      0          
   10    24        ROPE_INIT                                     3  ~16     !2
         25        ROPE_ADD                                      1  ~16     ~16, '%3A+'
         26        INIT_METHOD_CALL                                         !1, 'format'
         27        SEND_VAL_EX                                              'D%2C+d+M+y+H%3Ai%3As+O'
         28        DO_FCALL                                      0  $14     
         29        ROPE_END                                      2  ~15     ~16, $14
         30        ECHO                                                     ~15
         31        ECHO                                                     '%0A'
    8    32      > JMP                                                      ->17
         33    >   FE_FREE                                                  $10
   11    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.42 ms | 1388 KiB | 17 Q