PHPackages                             mjdymalla/iso3166-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mjdymalla/iso3166-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mjdymalla/iso3166-php
=====================

01PHP

Since Aug 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/MJDymalla/ISO3166-PHP)[ Packagist](https://packagist.org/packages/mjdymalla/iso3166-php)[ RSS](/packages/mjdymalla-iso3166-php/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

ISO3166-PHP
===========

[](#iso3166-php)

PHP implementation for retrieving ISO3166-1 and ISO3166-2 country codes and data. These codes are the standard for defining countries, dependent territories, special areas of geographical interest, and their prinicpal subdivisions.

### Data

[](#data)

Country data provided is taken from [ISO3166-Library](https://github.com/MJDymalla/ISO3166-Library).

### Installing

[](#installing)

```
$ composer require mjdymalla/iso3166-php

```

### Locales

[](#locales)

The data supports over 150 different locales. Although, it is worth noting that at country level (iso3166-1) 'en' (english) as a locale is supported but at subdivision level (iso3166-2) to avoid ambiguity on whether a subdivisions name is in english or infact the native country's latin equivalent 'mul\_Latn' (multi-latin) should be used instead.

### Usage

[](#usage)

All methods accept an array of locales which is used to fallback on, i.e. if provided locales are \['it', 'en'\] translations in 'it' will be prioritized, if a translation is not found then it will fallback to 'en'.

#### Country names

[](#country-names)

```
use MJDymalla\PHP\CountryData;

$countryData = new CountryData();
$data = $countryData->getCountryNames(['en']);

```

```
[
   [AU] => 'Australia'
]

```

#### Country names including meta data

[](#country-names-including-meta-data)

```
$data = $countryData->getCountries(['en']);

```

```
[
   [AU] => Array
      (
         [alpha_2] => AU
         [alpha_3] => AUS
         [numeric] => 036
         [name] => Australia
      )
]

```

#### Subdivision names

[](#subdivision-names)

```
$data = $countryData->getSubDivisionNames('US', ['mul_Latn']);

```

```
[
   [US-CA] => 'California',
   [US-CO] => 'Colorado',
   [US-CT] => 'Connecticut'
]

```

#### Subdivision names including meta data

[](#subdivision-names-including-meta-data)

```
$data = $countryData->getSubDivisions('US', ['ja']);

```

```
[
   [US-CA] => Array
      (
         [code] => US-CA
         [type] => State
         [name] => カリフォルニア
      )
   [US-CO] => Array
      (
         [code] => US-CO
         [type] => State
         [name] => コロラド
      )
]

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb47a8da6e4c626a62c8f60977ce9b94ba9bc43d2391caf6f239c20670b07643?d=identicon)[MJDymalla](/maintainers/MJDymalla)

---

Top Contributors

[![mdymalla](https://avatars.githubusercontent.com/u/55011443?v=4)](https://github.com/mdymalla "mdymalla (3 commits)")

### Embed Badge

![Health badge](/badges/mjdymalla-iso3166-php/health.svg)

```
[![Health](https://phpackages.com/badges/mjdymalla-iso3166-php/health.svg)](https://phpackages.com/packages/mjdymalla-iso3166-php)
```

###  Alternatives

[whitehat101/apr1-md5

Apache's APR1-MD5 algorithm in pure PHP

349.7M10](/packages/whitehat101-apr1-md5)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
