PHPackages                             noxxienl/nladdresslexer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. noxxienl/nladdresslexer

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

noxxienl/nladdresslexer
=======================

Package to evaluate and parse dutch addresses

v2.0.0(2y ago)864.4k↓11.6%3[1 issues](https://github.com/NoxxieNl/Nladdresslexer/issues)MITPHPPHP ^8.1

Since Jul 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/NoxxieNl/Nladdresslexer)[ Packagist](https://packagist.org/packages/noxxienl/nladdresslexer)[ RSS](/packages/noxxienl-nladdresslexer/feed)WikiDiscussions 2.x.x Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (7)Used By (0)

Dutch address parser
====================

[](#dutch-address-parser)

Dutch address parser is a library to parse address lines into the segments `street`, `number` and `suffix`.

[![packagist](https://camo.githubusercontent.com/30ab4c6bd0bc6e1b20f22ff1034ed748a54918beb72287fe1a96804330ad2100/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f787869656e6c2f6e6c616464726573736c65786572)](https://camo.githubusercontent.com/30ab4c6bd0bc6e1b20f22ff1034ed748a54918beb72287fe1a96804330ad2100/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f787869656e6c2f6e6c616464726573736c65786572) [![version](https://camo.githubusercontent.com/56434a4ae5a64c4137562e5e71921cd0b32e7e8c46bcecaf5c48add5dbde1adb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6e6f787869656e6c2f6e6c616464726573736c65786572)](https://camo.githubusercontent.com/56434a4ae5a64c4137562e5e71921cd0b32e7e8c46bcecaf5c48add5dbde1adb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6e6f787869656e6c2f6e6c616464726573736c65786572)

Example: `Plein 1926 12 A`

Will be parsed to:

StreetNumberSuffixPlein 192612AInstallation
------------

[](#installation)

Composer is used to install this package

```
composer require noxxienl/nladdresslexer
```

Upgrade from 1.x
----------------

[](#upgrade-from-1x)

2.x requires a minimum of php `8.1` to run. Support for php 8 and lower has been dropped.

To upgrade from 1.x simply update your composer file with

```
"noxxienl/nladdresslexer": "^2.0"
```

and run:

```
composer update noxxienl/nladdresslexer
```

Usage
-----

[](#usage)

```
use noxxienl\nladdresslexer\Parser;

$parser = new Parser;
$parser->evaluate('Plein 1926 12 A');

echo $parser->getStreet() . "\r\n"; // Plein 1926
echo $parser->getNumber() . "\r\n"; // 12
echo $parser->getSuffix() . "\r\n"; // A

echo $parser->getOriginalString();
```

Usage with splitting address
----------------------------

[](#usage-with-splitting-address)

Sometimes you may have address that does not have the format `street`, `number` &amp; `suffix`. To let the parser correctly do its work you need to split the string on your own before the parser can do its work.

For example: `50 A, Ringweg Zuid / Rijksweg A20`

```
use noxxienl\nladdresslexer\Parser;

$parser = new Parser;

list($number, $street) = explode(', ', '50 A, Ringweg Zuid / Rijksweg A20');
$parser->evaluate($street, $number);

echo $parser->getStreet() . "\r\n"; // Ringweg Zuid / Rijgsweg A20
echo $parser->getNumber() . "\r\n"; // 50
echo $parser->getSuffix() . "\r\n"; // A

echo $parser->getOriginalString();
```

Usage for splitting only numbers
--------------------------------

[](#usage-for-splitting-only-numbers)

Sometimes you may wish to split only the `number` and `suffix`. You can do so by setting the formatting of the parser to the following before executing the parsing:

```
Parser::setAddressFormat([
    Parser::T_NUMBER,
    Parser::T_SUFFIX,
]);
```

**Be carefull**: When setting the address format, it is changed for every parsing to beyond that point. Reset the format to its original state when you want to parse a full address:

```
Parser::setAddressFormat([
    Parser::T_STREET,
    Parser::T_NUMBER,
    Parser::T_SUFFIX,
]);
```

Testing
-------

[](#testing)

Testing is done using `pestphp`. ()

```
./vendor/bin/pest
```

To run the tests.

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Bugs
----

[](#bugs)

Submit a issue to the github repository and if you can find the fix be sure to also submit a pull request!

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~188 days

Recently: every ~129 days

Total

7

Last Release

1007d ago

Major Versions

v1.x-dev → 2.x-dev2023-08-16

PHP version history (3 changes)v1.1.1PHP ^7.4|^8.0|^8.1

v1.1.2PHP ^7.4|^8.0|^8.1|^8.2

2.x-devPHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/29e279d65c2b5d9edc049441bf5bd9bdfd14c475b1f8ad0c410883f75f4c77c1?d=identicon)[noxxieNl](/maintainers/noxxieNl)

---

Top Contributors

[![NoxxieNl](https://avatars.githubusercontent.com/u/178611?v=4)](https://github.com/NoxxieNl "NoxxieNl (6 commits)")[![prennings](https://avatars.githubusercontent.com/u/97327414?v=4)](https://github.com/prennings "prennings (1 commits)")[![tomvlk](https://avatars.githubusercontent.com/u/3877688?v=4)](https://github.com/tomvlk "tomvlk (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/noxxienl-nladdresslexer/health.svg)

```
[![Health](https://phpackages.com/badges/noxxienl-nladdresslexer/health.svg)](https://phpackages.com/packages/noxxienl-nladdresslexer)
```

###  Alternatives

[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[coduo/php-matcher

PHP Matcher enables you to match values with patterns

84312.5M46](/packages/coduo-php-matcher)[creof/geo-parser

Parser for geography coordinate strings

624.4M15](/packages/creof-geo-parser)[creof/wkt-parser

Parser for well-known text (WKT) object strings

554.8M16](/packages/creof-wkt-parser)[egeloen/serializer

Serializer for PHP 5.6+ supporting JSON, XML, YAML &amp; CSV

28574.6k3](/packages/egeloen-serializer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
