|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77608 http_build_query doesn't encode "+" in a float number
Submitted: 2019-02-12 04:48 UTC Modified: 2019-02-12 10:22 UTC
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: wxiaoguang at gmail dot com Assigned: nikic (profile)
Status: Closed Package: *URL Functions
PHP Version: 7.2.15 OS:
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: wxiaoguang at gmail dot com
New email:
PHP Version: OS:


 [2019-02-12 04:48 UTC] wxiaoguang at gmail dot com
http_build_query doesn't encode "+" in a float number (eg: 1E+14)

The "+" should be encoded to "%2B" in the output.

Test script:
echo http_build_query($a);

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-12 09:45 UTC]
-Assigned To: +Assigned To: nikic
 [2019-02-12 09:51 UTC]
Automatic comment on behalf of
Log: Fixed bug #77608
 [2019-02-12 09:51 UTC]
-Status: Assigned +Status: Closed
 [2019-02-12 10:10 UTC] wxiaoguang at gmail dot com
I think this bug also affects other (all) php versions.

Will all verions of PHP get this bug fix?
 [2019-02-12 10:22 UTC]
The bug fix is in PHP 7.2, PHP 7.3 and current development branches. Older versions of PHP are no longer actively supported.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun May 28 15:03:42 2023 UTC