Download the PHP package aklump/phone-number without Composer
On this page you can find all versions of the php package aklump/phone-number. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download aklump/phone-number
More information about aklump/phone-number
Files in aklump/phone-number
Download aklump/phone-number
More information about aklump/phone-number
Files in aklump/phone-number
Vendor aklump
Package phone-number
Short Description A lean, non-dependency PHP library to work with phone numbers.
License BSD-3-Clause
Homepage https://github.com/aklump/phone-number
Package phone-number
Short Description A lean, non-dependency PHP library to work with phone numbers.
License BSD-3-Clause
Homepage https://github.com/aklump/phone-number
Please rate this library. Is it a good library?
Informations about the package phone-number
Phone Number
A lean, non-dependency PHP library to work with phone numbers. The focus of the library is on U.S. phone numbers only at this time. To work with international phone numbers you might try Phone Normalizer, from which we've taken the same formatting strategy. (Thank you, dmamontov and 1on.)
Install with Composer
- Require this package:
Usage
Formatting Numbers
- Tokens are:
#CC#
for the country code.#c#
for the area code###
(leftmost three) for the local exchange.####
(rightmost four) for subscriber number.
- Pre-defined formats provided by
\AKlump\PhoneNumber\PhoneNumberFormats
- Invalid phone numbers will not format, but throw an exception.
- To obtain a list of violations for an invalid phone number use the
::validate
method.
If the context of your app is regional, you maybe want to assume a default area code.
Formatted for SMS
Using Custom Formats
Outside the Box Thinking
Validating Numbers
- See also
\AKlump\PhoneNumber\PhoneNumberViolations
All versions of phone-number with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.3
The package aklump/phone-number contains the following files
Loading the files please wait ....