#29593 [Opn->Bgs]: join() doesn't respect locale settings
| From: | tony2001@php.net | Date: | Tue, 17 Aug 2004 13:41:36 +0000 |
| Subject: | #29593 [Opn->Bgs]: join() doesn't respect locale settings | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64786@lists.php.net to get a copy of this message | ||
ID: 29593
Updated by: tony2001@php.net
Reported By: rafael dot lima at email dot com dot br
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux Gentoo
PHP Version: 4.3.8
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
Use var_dump($_POST); and you'll see that variables are on their
places. Debug you code.
Previous Comments:
------------------------------------------------------------------------
[2004-08-09 22:46:51] rafael dot lima at email dot com dot br
Description:
------------
When a use the join() function on an array that have a float value, the
string returned contains the values formatted without the setlocale()
settings
Reproduce code:
---------------
setlocale(LC_ALL,'pt_BR');
$x="10,01";
$a[1] = $x;
$a[2] = floatval(str_replace(",",".",$x));
$a[3] = floatval('10.01');
echo '<pre>';
print_r($a);
echo '</pre>';
$b = join("<br>",$a);
echo ($b);
Expected result:
----------------
Array
(
[1] => 10,01
[2] => 10,01
[3] => 10,01
)
10,01
10,01
10,01
Actual result:
--------------
Array
(
[1] => 10,01
[2] => 10,01
[3] => 10,01
)
10,01
10.01
10.01
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29593&edit=1