PHPackages                             jasny/iso - 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. jasny/iso

Abandoned → [umpirsky/country-list](/?search=umpirsky%2Fcountry-list)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

jasny/iso
=========

v0.2.0(11y ago)1841.6k↑18.1%7[5 issues](https://github.com/jasny/iso/issues)3PHPPHP &gt;=5.4.0

Since Aug 3Pushed 7y agoCompare

[ Source](https://github.com/jasny/iso)[ Packagist](https://packagist.org/packages/jasny/iso)[ RSS](/packages/jasny-iso/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (4)Used By (3)

ISO
===

[](#iso)

### This package is abandoned and no longer maintained. Use [umpirsky/country-list](https://github.com/umpirsky/country-list) instead.

[](#this-package-is-abandoned-and-no-longer-maintained-use-umpirskycountry-list-instead)

PHP library around standarized codes

ISO 3166-1
----------

[](#iso-3166-1)

### Countries

[](#countries)

The `Countries` class holds a list with (English) country names, conntected to their [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.

You can get a full list of countries, get a country code by name or get a country name by code.

```
Jasny\ISO\Countries::getList(); // List all countries
Jasny\ISO\Countries::getName("US"); // 'United States'
Jasny\ISO\Countries::getCode("United States"); // 'US'

```

Searching on an alternative country name is supported. For instance

```
Jasny\ISO\Countries::getCode("United States"); // 'US'
Jasny\ISO\Countries::getCode("United States of America"); // 'US'
Jasny\ISO\Countries::getCode("USA"); // 'US'

```

### Country subdivisions

[](#country-subdivisions)

The `CountrySubdivisions` class holds a list with subdivision (eg state of province) names by country, connect to their [ISO 3166-2](http://en.wikipedia.org/wiki/ISO_3166-2) code.

You can get a list of subdivisions for a country, get a subdivision code by name or get a subdivision name by code.

```
Jasny\ISO\CountrySubdivisions::getList("US"); // List all US states
Jasny\ISO\CountrySubdivisions::getName("US", "NY"); // 'New York'
Jasny\ISO\CountrySubdivisions::getCode("US", "New York"); // 'NY'

```

Searching on an alternative subdivision name is supported.

You can also check if a subdivision is required for a full address for a country. This is the case for Austrila, Canada, China, Montenegro, Malaysia and the United States.

```
Jasny\ISO\CountrySubdivisions::getRequired(); // ['AU', 'CA', 'CN', 'ME', 'MY', 'US']
Jasny\ISO\CountrySubdivisions::isRequired("US"); // true
Jasny\ISO\CountrySubdivisions::isRequired("NL"); // false

```

CSS Color Module Level 4
------------------------

[](#css-color-module-level-4)

### Colors

[](#colors)

The `Colors` class allows conversion between the different syntaxes for colors, including color names. The color syntax is devined by W3C standard [CSS Color Module Level 4](http://dev.w3.org/csswg/css-color/).

```
Jasny\ISO\Colors::getHex('blue'); // '#0000ff'
Jasny\ISO\Colors::getHex([0, 0, 255]); // '#0000ff'
Jasny\ISO\Colors::getRgb('blue'); // [0, 0, 255]
Jasny\ISO\Colors::getRgb('#0000ff'); // [0, 0, 255]
Jasny\ISO\Colors::getName('#0000ff'); // 'blue'
Jasny\ISO\Colors::getName([0, 0, 255]); // 'blue'

```

*Conversion from and to HSL is currently not supported*

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.4% 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 ~42 days

Total

2

Last Release

4310d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3379a93d51305df325df9045e1a8b205d195e4e8c01312dff53a000ee79002eb?d=identicon)[jasny](/maintainers/jasny)

---

Top Contributors

[![jasny](https://avatars.githubusercontent.com/u/100821?v=4)](https://github.com/jasny "jasny (13 commits)")[![severjason](https://avatars.githubusercontent.com/u/8376632?v=4)](https://github.com/severjason "severjason (6 commits)")

### Embed Badge

![Health badge](/badges/jasny-iso/health.svg)

```
[![Health](https://phpackages.com/badges/jasny-iso/health.svg)](https://phpackages.com/packages/jasny-iso)
```

###  Alternatives

[silverstripe/subsites

Run multiple sites from a single SilverStripe install.

64400.9k21](/packages/silverstripe-subsites)[ayesh/php-timer

High-resolution and monotonic stop-watch for all your needs. Supports timer start, pause, resume, stop, read, and minimal conversion.

25235.3k13](/packages/ayesh-php-timer)

PHPackages © 2026

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