|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-08-07 05:51 UTC] belanger dot b at gmail dot com
[2009-08-07 07:54 UTC] jani@php.net
[2009-08-07 10:23 UTC] rasmus@php.net
[2018-05-09 11:48 UTC] belanger dot b at gmail dot com
[2018-05-09 12:00 UTC] spam2 at rhsoft dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 06:00:01 2025 UTC |
Description: ------------ intval is not returning the correct value for '995' echo number_format('9.95'*100,0,'',''); // output 995 echo intval('9.95'*100); // output 994 Sorry but the most up to date server at my disposition is version 5.2.5 POSSIBLY RELATED REFUSED BUGS... found by me : http://bugs.php.net/bug.php?id=1960 (set to closed) found by system : http://bugs.php.net/bug.php?id=37554 (set to bogus) http://bugs.php.net/bug.php?id=39900 (set to bogus) Reproduce code: --------------- echo number_format('9.95'*100,0,'','') .' and '. number_format('1.16'*100,0,'','') ."\n". intval('9.95'*100); .' and '. intval('1.16'*100); Expected result: ---------------- 995 and 116 995 and 116 Actual result: -------------- 995 and 116 994 and 115