|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-03-26 10:29 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
Description: ------------ Using float in arrays with var_dump returns rounded results, which is definitly not the stored numbers... And if you try an echo sprintf('%.0f',$value[0]) you'll get the good value... Too bad :( Reproduce code: --------------- $value = array((float)"3700368445139",(float)"37003684447031"); var_dump($value); Expected result: ---------------- array(2) { [0]=> float(3700368445139) [1]=> float(37003684447031) } Actual result: -------------- array(2) { [0]=> float(3700368445140) [1]=> float(37003684447000) }