|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32149 str_replace and decimal separator ','
Submitted: 2005-03-01 15:00 UTC Modified: 2005-03-01 18:39 UTC
From: alec at alec dot pl Assigned:
Status: Closed Package: Strings related
PHP Version: 5.0.2 OS:
Private report: No CVE-ID: None
 [2005-03-01 15:00 UTC] alec at alec dot pl
in polish locale decimal separator of floats is ',' 
When I wanna to replace some string with some float, it returns string with '.' separator, but should be ','

Reproduce code:
$value = 11.11;
echo round($value,2)."-";
$str = '?';
echo str_replace('?',round($value,2),$str);

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-01 18:39 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 08:01:29 2024 UTC