3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zones_array = array(); $timestamp = time(); foreach(timezone_identifiers_list() as $key => $zone) { date_default_timezone_set($zone); $zones_array[$key]['zone'] = $zone; $zones_array[$key]['offset'] = (int) ((int) date('O', $timestamp))/100; $zones_array[$key]['diff_from_GMT'] = 'UTC/GMT ' . date('P', $timestamp); } var_dump($zones_array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 34
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 34
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/hCLJU
function name:  (null)
number of ops:  39
compiled vars:  !0 = $zones_array, !1 = $timestamp, !2 = $zone, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'time'
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !1, $5
    5     4        INIT_FCALL                                               'timezone_identifiers_list'
          5        DO_ICALL                                         $7      
          6      > FE_RESET_R                                       $8      $7, ->34
          7    > > FE_FETCH_R                                       ~9      $8, !2, ->34
          8    >   ASSIGN                                                   !3, ~9
    6     9        INIT_FCALL                                               'date_default_timezone_set'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
    7    12        FETCH_DIM_W                                      $12     !0, !3
         13        ASSIGN_DIM                                               $12, 'zone'
         14        OP_DATA                                                  !2
    8    15        INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'O'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $16     
         19        CAST                                          4  ~17     $16
         20        CAST                                          4  ~18     ~17
         21        DIV                                              ~19     ~18, 100
         22        FETCH_DIM_W                                      $14     !0, !3
         23        ASSIGN_DIM                                               $14, 'offset'
         24        OP_DATA                                                  ~19
    9    25        INIT_FCALL                                               'date'
         26        SEND_VAL                                                 'P'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $22     
         29        CONCAT                                           ~23     'UTC%2FGMT+', $22
         30        FETCH_DIM_W                                      $20     !0, !3
         31        ASSIGN_DIM                                               $20, 'diff_from_GMT'
         32        OP_DATA                                                  ~23
    5    33      > JMP                                                      ->7
         34    >   FE_FREE                                                  $8
   11    35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !0
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.95 ms | 1396 KiB | 23 Q