|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-14 01:29 UTC] iliaa@php.net
[2005-01-27 01:00 UTC] php-bugs at lists dot php dot net
[2006-07-16 10:59 UTC] helly@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
Description: ------------ When i try to obtain a value withou the separator give me a strange result... $sfero = number_format("0.25", 2, '', ''); echo $sfero; it give 25 and not 025!!!!! now i must use $sfero = number_format("0.25", 2, ',', ''); $sfero = str_replace(",", "", $sfero); i don't know if is a bug but first,with other php version, the function number_format worked fine Reproduce code: --------------- <?PHP for($i=1;$i<73;$i++){ $sfero = ($i*0.25); $sfero = number_format($sfero, 2, '', ''); echo $sfero."<br>"; } ?> Expected result: ---------------- 000 025 050 075 100 125 150 ....etc Actual result: -------------- 25 50 75 100 125 150 ....etc