PHPackages                             edward\_y/iso3166 - 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. edward\_y/iso3166

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

edward\_y/iso3166
=================

ISO 3166-1 PHP Library

4.0.4(4y ago)012MITPHPPHP ^7.3|^8.0

Since Jun 30Pushed 4y agoCompare

[ Source](https://github.com/Edward-git0/iso3166)[ Packagist](https://packagist.org/packages/edward_y/iso3166)[ Docs](https://github.com/Edward-git0/iso3166)[ RSS](/packages/edward-y-iso3166/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (18)Used By (0)

Edward-git0/iso3166
===================

[](#edward-git0iso3166)

A PHP library providing ISO 3166-1 data.

[![License](https://camo.githubusercontent.com/32f3719334017c911a635d1adf450f2178dfbf4c761c6b75ae19807b2a2e538b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7468657068706c65616775652f69736f333136362e737667)](https://camo.githubusercontent.com/32f3719334017c911a635d1adf450f2178dfbf4c761c6b75ae19807b2a2e538b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7468657068706c65616775652f69736f333136362e737667)

What is ISO 3166-1
------------------

[](#what-is-iso-3166-1)

> ISO 3166-1 is part of the ISO 3166 standard published by the International Organization for Standardization (ISO), and defines codes for the names of countries, dependent territories, and special areas of geographical interest. The official name of the standard is Codes for the representation of names of countries and their subdivisions – Part 1: Country codes. It defines three sets of country codes:
>
> - ISO 3166-1 alpha-2 – two-letter country codes which are the most widely used of the three, and used most prominently for the Internet's country code top-level domains (with a few exceptions).
> - ISO 3166-1 alpha-3 – three-letter country codes which allow a better visual association between the codes and the country names than the alpha-2 codes.
> - ISO 3166-1 numeric – three-digit country codes which are identical to those developed and maintained by the United Nations Statistics Division, with the advantage of script (writing system) independence, and hence useful for people or systems using non-Latin scripts.
>
> *-- [Wikipedia](http://en.wikipedia.org/wiki/ISO_3166-1)*

Installing
----------

[](#installing)

```
$ composer require edward_y/iso3166
```

Using
-----

[](#using)

Quick guide:

```
$data = (new League\ISO3166\ISO3166)->name($name);
$data = (new League\ISO3166\ISO3166)->alpha2($alpha2);
$data = (new League\ISO3166\ISO3166)->alpha3($alpha3);
$data = (new League\ISO3166\ISO3166)->numeric($numeric);
```

Data sample:

```
[
    'name' => 'Netherlands',
    'alpha2' => 'NL',
    'alpha3' => 'NLD',
    'numeric' => '528',
    'currency' => [
        'EUR',
    ]
]
```

Contributing
------------

[](#contributing)

Feel free to submit a pull request or create an issue.

License
-------

[](#license)

Edward-git0/iso3166 is licensed under the MIT license.

Source(s)
---------

[](#sources)

- [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) by [Wikipedia](http://www.wikipedia.org) licensed under [CC BY-SA 3.0 Unported License](http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License)
- [www.iso.org](http://www.iso.org)

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 66% 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.

###  Release Activity

Cadence

Every ~116 days

Recently: every ~3 days

Total

17

Last Release

1739d ago

Major Versions

1.x-dev → 2.0.02017-05-11

2.1.5 → 3.0.02020-12-05

3.0.0 → 4.0.02021-07-24

PHP version history (4 changes)1.0.0PHP ^5.5 || ^7.0

2.0.0PHP ^5.6 || ^7.0

2.1.2PHP ^7.0

3.0.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b2020e7834e65796e276ed24e691c5587c38ced5f209f966d3b4fbed59d5b01?d=identicon)[Edward-git0](/maintainers/Edward-git0)

---

Top Contributors

[![alcohol](https://avatars.githubusercontent.com/u/21414?v=4)](https://github.com/alcohol "alcohol (70 commits)")[![Edward-git0](https://avatars.githubusercontent.com/u/54463935?v=4)](https://github.com/Edward-git0 "Edward-git0 (20 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (5 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (2 commits)")[![markitosgv](https://avatars.githubusercontent.com/u/1706470?v=4)](https://github.com/markitosgv "markitosgv (2 commits)")[![fulldecent](https://avatars.githubusercontent.com/u/382183?v=4)](https://github.com/fulldecent "fulldecent (1 commits)")[![nikolaposa](https://avatars.githubusercontent.com/u/6012807?v=4)](https://github.com/nikolaposa "nikolaposa (1 commits)")[![npispas](https://avatars.githubusercontent.com/u/22989333?v=4)](https://github.com/npispas "npispas (1 commits)")[![arubacao](https://avatars.githubusercontent.com/u/7462542?v=4)](https://github.com/arubacao "arubacao (1 commits)")[![drcreazy](https://avatars.githubusercontent.com/u/3186282?v=4)](https://github.com/drcreazy "drcreazy (1 commits)")[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (1 commits)")[![einenlum](https://avatars.githubusercontent.com/u/5675200?v=4)](https://github.com/einenlum "einenlum (1 commits)")

---

Tags

librarycountriesISO 3166iso31663166-1

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/edward-y-iso3166/health.svg)

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

###  Alternatives

[league/iso3166

ISO 3166-1 PHP Library

69536.3M116](/packages/league-iso3166)[payum/iso4217

ISO 4217 PHP Library

16312.1M5](/packages/payum-iso4217)[dekor/php-array-table

PHP Library for printing associative arrays as text table (similar to mysql terminal console)

296.6M2](/packages/dekor-php-array-table)[juanparati/iso-codes

A PHP library that provides ISO codes, currencies, languages, timezones and additional geopolitical information

17146.4k](/packages/juanparati-iso-codes)[thalidzhokov/country-codes

CountryCodes PHP Class to get array of countries with ISO 3166-1 alpha-2, ISO 3166-1 alpha-3, ISO 3166-1 numeric and ISD codes it can provide following information related to country

13111.5k](/packages/thalidzhokov-country-codes)

PHPackages © 2026

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