megastruktur / phone-country-codes
A simple library to get phone country codes.
Installs: 177 055
Dependents: 3
Suggesters: 0
Security: 0
Stars: 8
Watchers: 1
Forks: 4
Open Issues: 0
pkg:composer/megastruktur/phone-country-codes
Requires
- php: >=5.3.0
 
Requires (Dev)
- phpunit/phpunit: 4.0.*
 
This package is not auto-updated.
Last update: 2025-10-26 09:19:40 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();