3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Locale; echo count(DateTimeZone::listIdentifiers()); echo "\n"; foreach (DateTimeZone::listIdentifiers() as $identifier) { $timezone = new DateTimeZone($identifier); $location = $timezone->getLocation(); $countryCode = $location['country_code'] ?? 'N/A'; // 国コードから国名(日本語)を取得 $countryName = Locale::getDisplayRegion('-' . $countryCode, 'ja'); // タイムゾーンの地域名 $timezoneName = $identifier; echo "国名: {$countryName}, タイムゾーン: {$timezoneName}\n"; }

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 34
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 34
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/L1Y20
function name:  (null)
number of ops:  36
compiled vars:  !0 = $identifier, !1 = $timezone, !2 = $location, !3 = $countryCode, !4 = $countryName, !5 = $timezoneName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_STATIC_METHOD_CALL                                  'DateTimeZone', 'listIdentifiers'
          1        DO_FCALL                                      0  $6      
          2        COUNT                                            ~7      $6
          3        ECHO                                                     ~7
    5     4        ECHO                                                     '%0A'
    6     5        INIT_STATIC_METHOD_CALL                                  'DateTimeZone', 'listIdentifiers'
          6        DO_FCALL                                      0  $8      
          7      > FE_RESET_R                                       $9      $8, ->34
          8    > > FE_FETCH_R                                               $9, !0, ->34
    7     9    >   NEW                                              $10     'DateTimeZone'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !1, $10
    8    13        INIT_METHOD_CALL                                         !1, 'getLocation'
         14        DO_FCALL                                      0  $13     
         15        ASSIGN                                                   !2, $13
    9    16        FETCH_DIM_IS                                     ~15     !2, 'country_code'
         17        COALESCE                                         ~16     ~15
         18        QM_ASSIGN                                        ~16     'N%2FA'
         19        ASSIGN                                                   !3, ~16
   12    20        INIT_STATIC_METHOD_CALL                                  'Locale', 'getDisplayRegion'
         21        CONCAT                                           ~18     '-', !3
         22        SEND_VAL_EX                                              ~18
         23        SEND_VAL_EX                                              'ja'
         24        DO_FCALL                                      0  $19     
         25        ASSIGN                                                   !4, $19
   15    26        ASSIGN                                                   !5, !0
   17    27        ROPE_INIT                                     5  ~23     '%E5%9B%BD%E5%90%8D%3A+'
         28        ROPE_ADD                                      1  ~23     ~23, !4
         29        ROPE_ADD                                      2  ~23     ~23, '%2C+%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%BE%E3%83%BC%E3%83%B3%3A+'
         30        ROPE_ADD                                      3  ~23     ~23, !5
         31        ROPE_END                                      4  ~22     ~23, '%0A'
         32        ECHO                                                     ~22
    6    33      > JMP                                                      ->8
         34    >   FE_FREE                                                  $9
   18    35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.28 ms | 942 KiB | 13 Q