3v4l.org

run code in 300+ PHP versions simultaneously
<?php $countries = ['US', 'CA', 'MX', 'GB', 'IE']; $regions = []; foreach ($countries as $country) { $tz = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, $country); $countryRegions = []; foreach ($tz as $tzid) { $t = new DateTimeZone($tzid); $countryRegions[$tzid] = $t->getLocation()['comments'] ?: 'Default'; } asort($countryRegions); $regions[$country] = $countryRegions; } var_export($regions);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 31
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 31
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 24
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 24
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 24
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/66Wvt
function name:  (null)
number of ops:  36
compiled vars:  !0 = $countries, !1 = $regions, !2 = $country, !3 = $tz, !4 = $countryRegions, !5 = $tzid, !6 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2      > FE_RESET_R                                       $9      !0, ->31
          3    > > FE_FETCH_R                                               $9, !2, ->31
    7     4    >   INIT_STATIC_METHOD_CALL                                  'DateTimeZone', 'listIdentifiers'
          5        SEND_VAL                                                 4096
          6        SEND_VAR                                                 !2
          7        DO_FCALL                                      0  $10     
          8        ASSIGN                                                   !3, $10
    9     9        ASSIGN                                                   !4, <array>
   10    10      > FE_RESET_R                                       $13     !3, ->24
         11    > > FE_FETCH_R                                               $13, !5, ->24
   11    12    >   NEW                                              $14     'DateTimeZone'
         13        SEND_VAR_EX                                              !5
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !6, $14
   12    16        INIT_METHOD_CALL                                         !6, 'getLocation'
         17        DO_FCALL                                      0  $18     
         18        FETCH_DIM_R                                      ~19     $18, 'comments'
         19        JMP_SET                                          ~20     ~19, ->21
         20        QM_ASSIGN                                        ~20     'Default'
         21        ASSIGN_DIM                                               !4, !5
         22        OP_DATA                                                  ~20
   10    23      > JMP                                                      ->11
         24    >   FE_FREE                                                  $13
   15    25        INIT_FCALL                                               'asort'
         26        SEND_REF                                                 !4
         27        DO_ICALL                                                 
   16    28        ASSIGN_DIM                                               !1, !2
         29        OP_DATA                                                  !4
    6    30      > JMP                                                      ->3
         31    >   FE_FREE                                                  $9
   19    32        INIT_FCALL                                               'var_export'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.26 ms | 1006 KiB | 15 Q