|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-11-04 13:44 UTC] svn@php.net
[2009-11-04 13:44 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ parse_url incorrectly parses URLs with no query and a '?' in the fragment. It will either interpret the fragment as the query, or split the fragment between the host and query. Reproduce code: --------------- print_r(parse_url('http://www.example.com/#a?b')); print_r(parse_url('http://www.example.com#a?b')); Expected result: ---------------- Array ( [scheme] => http [host] => www.example.com [path] => / [fragment] => a?b ) Array ( [scheme] => http [host] => www.example.com [fragment] => a?b ) Actual result: -------------- Array ( [scheme] => http [host] => www.example.com [path] => / [query] => a?b ) Array ( [scheme] => http [host] => www.example.com#a [query] => b )