vbpupil / uk-postcode-validation
UK Postcode Validation
Installs: 109
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/vbpupil/uk-postcode-validation
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: 5.7.27
This package is auto-updated.
Last update: 2025-10-12 07:39:13 UTC
README
UK Postcode Validation
UK postcode validation tool used to determine that a string given is a valid UK Postcode. The object then returned contains the following:
- Type - area classification
- Head - first section of the postcode
- Tail - last section of the postcode
How to use?
$p = new Postode('SW1A 1AA'); $p->getType(); # returns string UK_MAINLAND $p->getHead(); # returns string SW1A $p->getTail(); # returns string 1AA