Bug #80011 [Opn]: Bug at cast type float
| From: | god6dog at gmail dot com | Date: | Mon, 24 Aug 2020 09:22:10 +0000 |
| Subject: | Bug #80011 [Opn]: Bug at cast type float | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-228728@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80011&edit=1
ID: 80011
User updated by: god6dog at gmail dot com
Reported by: god6dog at gmail dot com
-Summary: php 7.4.9
+Summary: Bug at cast type float
Status: Open
Type: Bug
Package: *General Issues
Operating System: linux
PHP Version: 7.4.9
Block user comment: N
Private report: N
New Comment:
Changed description
Previous Comments:
------------------------------------------------------------------------
[2020-08-24 09:18:35] god6dog at gmail dot com
Description:
------------
---
From manual page: https://php.net/function.http-build-query
---
float type with zero at the end is incorrectly converted
Test script:
---------------
Bug at cast type float:
php > echo http_build_query(['foo' => 123.00]);
foo=123
php > echo http_build_query(['foo' => 123.01]);
foo=123.01
Expected result:
----------------
php > echo http_build_query(['foo' => 123.00]);
foo=123.00
Actual result:
--------------
php > echo http_build_query(['foo' => 123.00]);
foo=123
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80011&edit=1