Library to parse a PDO DSN string.
Via Composer
$ composer require exileed/pdoparsedsn
$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
Please see CHANGELOG for more information on what has changed recently.
$ composer test
If you discover any security related issues, please email me@exileed.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.