megastruktur / phone-country-codes
A simple library to get phone country codes.
Installs: 133 381
Dependents: 3
Suggesters: 0
Security: 0
Stars: 8
Watchers: 1
Forks: 4
Open Issues: 0
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 4.0.*
This package is not auto-updated.
Last update: 2024-11-10 04:17:23 UTC
README
The library provides a list of country phone codes.
Example
getCodesList
method:
"AF" => "+93",
"AX" => "+358",
"AL" => "+355",
"DZ" => "+213",
"AS" => "+1684",
getCodesFullList
method allows to get the list of all details per phone/country code.
Usage
// Return the list of phone codes: \megastruktur\PhoneCountryCodes::getCodesList(); /* Return the full array of codes and details: * "country_code" => [ * "name", * "dial_code", * "code", * ] */ \megastruktur\PhoneCountryCodes::getCodesFullList();