carpcai/address-parser
最新稳定版本:1.2.0
Composer 安装命令:
composer require carpcai/address-parser
包简介
A PHP library covers PHP 5.4 to 7.3, split an address street to street, states, city, zipcode.
README 文档
README
A PHP library covers PHP 5.4 to 7.3, split an address street to street, states, city, zipcode.
Installation
This project can be installed via Composer:
$ composer require carpcai/address-parser
How to use
You can use the service as follows:
$addressObj = Parser::newParse('555 Test Drive, Testville, CA 98773');
var_dump([
'country' => $addressObj->country,
'state' => $addressObj->state,
'city' => $addressObj->city,
'addressLine1' => $addressObj->addressLine1,
'addressLine2' => $addressObj->addressLine2,
'zipcode' => $addressObj->zipcode,
]);
The output of this command will be:
array(6) {
["country"]=>
string(2) "US"
["state"]=>
string(2) "CA"
["city"]=>
string(9) "Testville"
["addressLine1"]=>
string(14) "555 Test Drive"
["addressLine2"]=>
string(0) ""
["zipcode"]=>
string(5) "98773"
}
统计信息
- 总下载量: 24.67k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-02