note 27541 rejected from function.parse-url by tix
| From: | tix@php.net | Date: | Tue, 10 Dec 2002 15:10:34 +0000 |
| Subject: | note 27541 rejected from function.parse-url by tix | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40663@lists.php.net to get a copy of this message | ||
This breaks if the username contains an '@' sign:
<?php
$url=parse_url('http://me@abc.com:pass@xyz.org/page.php');
var_dump($url);
?>
array(4) {
["scheme"]=>
string(4) "http"
["host"]=>
string(7) "abc.com"
["user"]=>
string(2) "me"
["path"]=>
string(9) "/page.php"
}
array(5) {
["scheme"]=>
string(4) "http"
["host"]=>
string(7) "xyz.org"
["user"]=>
string(10) "me@abc.com"
["pass"]=>
string(4) "pass"
["path"]=>
string(9) "/page.php"
}