rossriley/postcodelib

对英国邮编进行简单分析和验证

1.0 2016-01-22 13:38 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:52:56 UTC


README

这个简单的类确保邮编有效,并提供一些辅助方法以简化格式化。

用法

use Postcodelib\Postcode;

$postcode = new Postcode('B55SE');
$postcode->valid(); // returns true
$postcode->postcode(); // returns a normalised string: B5 5SE
$postcode->prefix(); // returns B5
$postcode->suffix(); // returns 5SE