PHPackages                             exileed/pdoparsedsn - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. exileed/pdoparsedsn

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

exileed/pdoparsedsn
===================

A class for parsing PHP's PDO strings.

1.0.0(6y ago)12.6k1MITPHPPHP ~5.6|~7.0

Since Mar 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/exileed/PDOParseDSN)[ Packagist](https://packagist.org/packages/exileed/pdoparsedsn)[ Docs](https://github.com/exileed/PDOParseDSN)[ RSS](/packages/exileed-pdoparsedsn/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

PDOParseDSN
===========

[](#pdoparsedsn)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a96063678c0deecc4a80a7a0d8cf6a5b3391c475419492608ca8e354f022311d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6578696c6565642f70646f706172736564736e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/exileed/pdoparsedsn)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/d97264d4b673fd64439496a67916e904fc14ead9e3d780b9a903c511e1f9a439/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6578696c6565642f70646f706172736564736e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/exileed/pdoparsedsn)[![Coverage Status](https://camo.githubusercontent.com/d4026d3ea956b78d48329a3bc7d443b1f36c1d23bcb8dce3826760617d9ba3f4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6578696c6565642f70646f706172736564736e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/exileed/pdoparsedsn/code-structure)[![Quality Score](https://camo.githubusercontent.com/c8d4453cc06c90ac7ff1d3b97b3212c3b7a60f621fe521c63e00c8e0b58c1fc8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6578696c6565642f70646f706172736564736e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/exileed/pdoparsedsn)[![Total Downloads](https://camo.githubusercontent.com/c3a55ae97921afdd2ddabd0a43aff991384c784758dafb678c5078f1db7d4a0d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6578696c6565642f70646f706172736564736e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/exileed/pdoparsedsn)

Library to parse a PDO DSN string.

Install
-------

[](#install)

Via Composer

```
$ composer require exileed/pdoparsedsn
```

Usage
-----

[](#usage)

```
$dsn = new \ExileeD\PDOParseDSN\DSN('mysql:host=127.0.0.1;port=3306;dbname=test_db');

$dsn->getProtocol(); // mysql
$dsn->getHost(); // 127.0.0.1
$dsn->getPort(); // 3306
$dsn->getDatabase(); // test_db
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Dmitriy Kuts](https://github.com/exileed)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

2261d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e92b6ee31e63ba56754db82b0fe82106c4e766dd161a0fd6c59cc4acaa23bd5?d=identicon)[exileed](/maintainers/exileed)

---

Top Contributors

[![exileed](https://avatars.githubusercontent.com/u/942898?v=4)](https://github.com/exileed "exileed (1 commits)")

---

Tags

dsnlibrarypdophppdoexileedpdoparsedsn

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/exileed-pdoparsedsn/health.svg)

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

PHPackages © 2026

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