|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2016-11-11 15:22 UTC] nikic@php.net
  [2016-11-13 16:07 UTC] ab@php.net
 
-Status: Open
+Status: Wont fix
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 05:00:02 2025 UTC | 
Description: ------------ When running the following code on PHP 7.0.12 and 7.0.13, a different result is returned. In the later version, the user and pass attributes are missing. This _only_ occurs when the first character of the password is # (hash/pound). Strong passwords can often include the # symbol so this is unexpected behaviour. I've not raised a bug in PHP before, please let me know if you need further information to resolve this! Test script: --------------- <?php $url = "mysql://user:#fhdsjfghjdf@host.eu-west-1.rds.amazonaws.com:3306/database_name"; var_dump(parse_url($url)); Expected result: ---------------- array(6) { ["scheme"]=> string(5) "mysql" ["host"]=> string(32) "host.eu-west-1.rds.amazonaws.com" ["port"]=> int(3306) ["user"]=> string(4) "user" ["pass"]=> string(12) "#fhdsjfghjdf" ["path"]=> string(14) "/database_name" } Actual result: -------------- array(3) { ["scheme"]=> string(5) "mysql" ["host"]=> string(4) "user" ["fragment"]=> string(63) "fhdsjfghjdf@host.eu-west-1.rds.amazonaws.com:3306/database_name" }