waughj/us-phone-number
Composer 安装命令:
composer require waughj/us-phone-number
包简介
Class for easily reformatting a US phone number.
README 文档
README
Class for easily reformatting a US phone number.
Constructor takes in 1 argument, which can either be a string with at least 10 numbers, an array with at least 3 items, or another instance of USPhoneNumber class. Any inputs that violate these rules or which lead to parts of a phone number with the wrong number of digits will throw an InvalidPhoneNumberException.
Example
use WaughJ\USPhoneNumber\USPhoneNumber;
$phone_number = new USPhoneNumber( '2565552028' );
echo $phone_number->getFormat( '(a) p – l' );
Will print:
(256) 555 — 2028
Changelog
0.1.0
- Initial Release
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0-or-later
- 更新时间: 2019-09-24