|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79810 BC break in parse_url in PHP 8.0.0-dev
Submitted: 2020-07-08 15:06 UTC Modified: 2020-07-08 15:11 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: wouter at madewithlove dot be Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 8.0.0alpha1 OS: ubuntu
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: wouter at madewithlove dot be
New email:
PHP Version: OS:


 [2020-07-08 15:06 UTC] wouter at madewithlove dot be
When running parse_url on an url ending in `?` (such as, parse_url behaves differently in PHP8.0.0 than it did in PHP 7.x. It now adds a `query` array key containing an empty string, which wasn't the case previously.

Test script:


Expected result:
array(2) {
  string(5) "https"
  string(11) ""

The result should be the same as in PHP7.x

Actual result:
array(3) {
  string(5) "https"
  string(11) ""
  string(0) ""


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-07-08 15:11 UTC]
-Status: Open +Status: Not a bug
 [2020-07-08 15:11 UTC]
This is an intentional change and documented in the upgrading notes:
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Sep 27 12:05:54 2022 UTC