|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-10 05:13 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
parse_url breaks if a username containing an '@' sign is used: <?php $url=parse_url('http://me@abc.com:pass@xyz.org/page.php'); var_dump($url); ?> Returns: array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(7) "abc.com" ["user"]=> string(2) "me" ["path"]=> string(9) "/page.php" } Should return: 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" }