3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.47 ms | 1396 KiB | 15 Q