rossriley / postcodelib
Perform simple analysis and validation on UK postcodes
1.0
2016-01-22 13:38 UTC
This package is not auto-updated.
Last update: 2024-11-09 19:34:39 UTC
README
This simple class ensure that a postcode is valid along with some helper methods to ease formatting.
Usage
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