Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 29, 2024 via composer

league/iso3166 4.3.1

ISO 3166-1 PHP Library
Package summary
Share
0
issues
1
license
1
MIT
Package created
30 Jun 2016
Version published
11 Sep 2023
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
league/iso3166@4.3.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
ⓘ This is a list of league/iso3166 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does league/iso3166 do?

The league/iso3166 library is a PHP package specifically developed to provide ISO 3166-1 data. ISO 3166-1 is part of the ISO 3166 standard published by the International Organization for Standardization (ISO). This standard defines codes for the names of countries, dependent territories, and special areas of geographical interest. To be specific, it defines three sets of country codes, including ISO 3166-1 alpha-2 – two-letter country codes, ISO 3166-1 alpha-3 – three-letter country codes, and ISO 3166-1 numeric – three-digit country codes. The library hence gives you access to these country codes in a developer-friendly way, making it easier to include country-specific information in your PHP projects.

How do you use league/iso3166?

To use the league/iso3166 library in your PHP projects, you should first install it via composer, a widely used dependency manager for PHP. Installation can be accomplished by running the following command in your command-line interface:

$ composer require league/iso3166

Once installed, the library can be used to retrieve data about any country. Here are some examples of code usage:

Retrieve a country by name:

$data = (new League\ISO3166\ISO3166)->name('Netherlands');

Retrieve a country by ISO 3166-1 alpha-2 code:

$data = (new League\ISO3166\ISO3166)->alpha2('NL');

Retrieve a country by ISO 3166-1 alpha-3 code:

$data = (new League\ISO3166\ISO3166)->alpha3('NLD');

Retrieve a country by ISO 3166-1 numeric code:

$data = (new League\ISO3166\ISO3166)->numeric('528');

Each of these methods will return an associative array with details about the specified country.

Where are the league/iso3166 docs?

The documentation of league/iso3166 can be found on the website of the PHP League at https://iso3166.thephpleague.com. The 'Using' section of the documentation provides a comprehensive guide on how to utilise this library to retrieve country data based on ISO 3166-1 codes. It also provides information about the structure of the data returned by the library's methods.