|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80431 parse_url() return fragment, query while there is not.
Submitted: 2020-11-27 08:06 UTC Modified: 2020-11-27 08:11 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: kawewong at gmail dot com Assigned:
Status: Closed Package: URL related
PHP Version: 8.0.0 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: kawewong at gmail dot com
New email:
PHP Version: OS:


 [2020-11-27 08:06 UTC] kawewong at gmail dot com
If I enter the URL like this "/path?#"
The `parse_url()` function always return fragment and query array key while previous versions of PHP like 5.x, 7.x doesn't return these value if not exists.

Expected result:
    'path' => '/path',

Actual result:
    'path' => '/path',
    'query' => '',
    'fragment' => '',


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-27 08:11 UTC]
-Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem
 [2020-11-27 08:11 UTC]
This is a deliberate change.
(search for "parse_url")

However, the function's docs could use a Changelog entry.
 [2021-09-24 16:46 UTC]
Automatic comment on behalf of cmb69
Log: Fix #80431: parse_url() return fragment, query while there is not
 [2021-09-24 16:46 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 26 07:03:37 2021 UTC