Skip to content

Instantly share code, notes, and snippets.

@coreymcmahon
Created February 19, 2013 07:28
Show Gist options
  • Save coreymcmahon/4983779 to your computer and use it in GitHub Desktop.
Save coreymcmahon/4983779 to your computer and use it in GitHub Desktop.
Using parse_url. From the article: The 12 Factor PHP App - Part 1, http://www.modernphpbook.com/articles/the-12-factor-php-app-part-1 - Fig 2
<?php
$url = parse_url('mysql://dbuser:dbpass@localhost:4567/application_db');
var_dump($url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment