Skip to content

vasildakov-zz/postcode-parser

Repository files navigation

UK Postcode Parser

Build Status Coverage Status Scrutinizer Code Quality Latest Stable Version Total Downloads License

Installation

The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

composer require vasildakov/postcode-parser

Examples

<?php
use VasilDakov\Postcode\Parser;

$parser = new Parser('AA9A 9AA');

var_dump($parser->outward()); // AA9A

var_dump($parser->inward()); // 9AA

$components = $parser->parse(); // array

License

Code released under the MIT license