|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
27 - 16 = ?
Subscribe to this entry?

 [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: Fri Oct 07 16:05:56 2022 UTC