|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-02-10 05:32 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 08:00:01 2025 UTC |
Description: ------------ The following code should output exactly the same number in both echo cases but it doesn't. However, multiply the number by 1000 instead of the 100 on the first line and everything will work fine. Reproduce code: --------------- <?php $test = (642 + 0.56) * 100; echo $test . "\n"; $test = intval ($test); echo $test; ?> Expected result: ---------------- 64256 64256 Actual result: -------------- 64256 64255 Very weird, I have only seen it happen with this particular case.