megastruktur/phone-country-codes

A simple library to get phone country codes.

0.4 2017-10-14 23:18 UTC

This package is not auto-updated.

Last update: 2024-09-15 03:18:55 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();