propt8 / country-information
PHP library for country information
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/propt8/country-information
Requires
- php: >=7.1
This package is auto-updated.
Last update: 2025-09-22 06:02:44 UTC
README
Country Information
Installation
Package is available on Packagist, you can install it using Composer.
composer require propt8/country-information
Dependencies
- PHP 7.1+
Basic usage
use propt8\Country\Country; Country::countryName('Lithuania'); // return CountryInformationEntity Country::countryCode('LT'); // return CountryInformationEntity Country::countryAlpha3Code('LTU'); // return CountryInformationEntity Country::countryCode('LT')->toArray();
Data sample:
{
"country_name": "Lithuania",
"country_code": "LT",
"country_alpha3_code": "LTU",
"country_numeric_code": 440,
"capital": "Vilnius",
"country_demonym": "Lithuanians",
"total_area": 65300,
"population": 2876475,
"idd_code": "370",
"currency_code": "LTL",
"currency_name": "Lithuanian Litas",
"currency_symbol": "Lt",
"lang_code": "LT",
"lang_name": "Lithuanian",
"cctld": "lt"
}