PHPackages                             ixnode/php-dsn-parser - 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. ixnode/php-dsn-parser

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

ixnode/php-dsn-parser
=====================

PHP DSN parser - This library helps to parse DSN\\URI strings.

0.1.1(2y ago)235MITShellPHP ^8.2

Since Sep 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ixnode/php-dsn-parser)[ Packagist](https://packagist.org/packages/ixnode/php-dsn-parser)[ RSS](/packages/ixnode-php-dsn-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

PHP DSN Parser
==============

[](#php-dsn-parser)

[![Release](https://camo.githubusercontent.com/988309dfcfd03cf7b7031bd755e94bf647d410979184782db06c1b9663834810/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f69786e6f64652f7068702d64736e2d706172736572)](https://github.com/ixnode/php-dsn-parser/releases)[![](https://camo.githubusercontent.com/f2563453ff307994a360481c89cd0d7edf442a0907bb50cd944e02633f24a15a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f69786e6f64652f7068702d64736e2d706172736572)](https://github.com/ixnode/php-dsn-parser/releases)[![](https://camo.githubusercontent.com/08262d287767a709806087e6998caab8b12641ae91c5393cce328faf5ecef4a7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f69786e6f64652f7068702d64736e2d7061727365722e737667)](https://camo.githubusercontent.com/08262d287767a709806087e6998caab8b12641ae91c5393cce328faf5ecef4a7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f69786e6f64652f7068702d64736e2d7061727365722e737667)[![PHP](https://camo.githubusercontent.com/9ffda6c94e9634fafbd5ff0f68f442ccb690a9b88c8613f79b9c2ec14f5e596b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d3737376262332e7376673f6c6f676f3d706870266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535267374796c653d666c6174)](https://www.php.net/supported-versions.php)[![PHPStan](https://camo.githubusercontent.com/29fcb055286f72da2b9c961f987152d1ac26a91d6cea221174abe7e01b5b7857/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c2532304d61782d3737376262332e7376673f7374796c653d666c6174)](https://phpstan.org/user-guide/rule-levels)[![PHPUnit](https://camo.githubusercontent.com/de101a446df383674178b80c404288664983cc6de751737d976d3df023942af9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f504850556e69742d556e697425323054657374732d3662396264322e7376673f7374796c653d666c6174)](https://phpunit.de)[![PHPCS](https://camo.githubusercontent.com/ee1fdc76b568e414c96c160eb608dd4680475a67d714661b70a3b3c43f6ded54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50485043532d50535231322d3431366434652e7376673f7374796c653d666c6174)](https://www.php-fig.org/psr/psr-12/)[![PHPMD](https://camo.githubusercontent.com/223a2afede2bd4bf4d524b7610277838a5d75504f7087fc6c36847b81a80ab43/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048504d442d414c4c2d3336346138332e7376673f7374796c653d666c6174)](https://github.com/phpmd/phpmd)[![Rector - Instant Upgrades and Automated Refactoring](https://camo.githubusercontent.com/9c119c037099401c8a61bd1ce556a58158eb09bfe452b2d132b94500e6368714/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526563746f722d504850253230382e322d3733613136352e7376673f7374796c653d666c6174)](https://github.com/rectorphp/rector)[![LICENSE](https://camo.githubusercontent.com/e5ea4c19422baff789692dd36ee83fc11b6dc67d211dd4a56b4c721e509e8b27/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69786e6f64652f7068702d6170692d76657273696f6e2d62756e646c65)](https://github.com/ixnode/php-api-version-bundle/blob/master/LICENSE)

> This library helps to parse DSN\\URI strings.

1. Usage
--------

[](#1-usage)

```
use Ixnode\PhpDsnParser\DsnParser;
```

```
$dsnParser = new DsnParser('smtp://suserweb:S22jD7Po%.,/zu34k@mail.domain.tld:25?verify_peer=0');

print_r($dsnParser->getParsed());
// (array) [
//     'protocol' => 'smtp',
//     'user' => 'suserweb',
//     'password' => 'S22jD7Po%.,/zu34k',
//     'host' => 'mail.domain.tld',
//     'port' => 25,
//     'options' => 'verify_peer=0',
// ]
```

2. Installation
---------------

[](#2-installation)

```
composer require ixnode/php-dsn-parser
```

```
vendor/bin/php-dsn-parser -V
```

```
php-dsn-parser 0.1.0 (03-07-2023 01:17:26) - Björn Hempel
```

3. Library development
----------------------

[](#3-library-development)

```
git clone git@github.com:ixnode/php-dsn-parser.git && cd php-dsn-parser
```

```
composer install
```

```
composer test
```

4. License
----------

[](#4-license)

This library is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

975d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b92095b1e1e279ccad060449bca0e21bf613b6e33796d878f7bfc212a4680bad?d=identicon)[ixnode](/maintainers/ixnode)

---

Top Contributors

[![bjoern-hempel](https://avatars.githubusercontent.com/u/5531245?v=4)](https://github.com/bjoern-hempel "bjoern-hempel (3 commits)")

---

Tags

uriphpparserdsn

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ixnode-php-dsn-parser/health.svg)

```
[![Health](https://phpackages.com/badges/ixnode-php-dsn-parser/health.svg)](https://phpackages.com/packages/ixnode-php-dsn-parser)
```

###  Alternatives

[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[simplehtmldom/simplehtmldom

A fast, simple and reliable HTML document parser for PHP.

1921.3M14](/packages/simplehtmldom-simplehtmldom)[corveda/php-sandbox

A PHP library that can be used to run PHP code in a sandboxed environment

23483.5k2](/packages/corveda-php-sandbox)[romanpitak/nginx-config-processor

Nginx configuration files processor.

7235.3k1](/packages/romanpitak-nginx-config-processor)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[leonelquinteros/php-toml

PHP parser for TOML language ( https://github.com/toml-lang/toml )

266.7k](/packages/leonelquinteros-php-toml)

PHPackages © 2026

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