Bug #62760 [Opn->Wfx]: regression in _php_math_number_format(d,dec,dec_point,thousand_sep) behaviour
| From: | laruence@php.net | Date: | Fri, 30 Jan 2015 06:31:59 +0000 |
| Subject: | Bug #62760 [Opn->Wfx]: regression in _php_math_number_format(d,dec,dec_point,thousand_sep) behaviour | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-190342@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62760&edit=1
ID: 62760
Updated by: laruence@php.net
Reported by: okneigres at gmail dot com
Summary: regression in
_php_math_number_format(d,dec,dec_point,thousand_sep)
behaviour
-Status: Open
+Status: Wont fix
Type: Bug
Package: Math related
Operating System: Linux
PHP Version: 5.4Git-2012-08-06 (Git)
Block user comment: N
Private report: N
New Comment:
use _php_math_number_format_ex instead
Previous Comments:
------------------------------------------------------------------------
[2012-08-06 16:21:12] okneigres at gmail dot com
Description:
------------
in php 5.3
char *formatted = _php_math_number_format(1234.56, 2, ".", "\x00");
printf("%s", formatted);
will write "1234.56"
But, in php 5.4 it will write "1"
It happens because _php_math_number_format() in php 5.4 use
_php_math_number_format_ex(), but code wasn't refactored correctly.
Test script:
---------------
char *formatted = _php_math_number_format(1234.56, 2, ".", "\x00");
printf("returns %s, but correct result is 1234.56", formatted);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62760&edit=1