|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-06-21 23:43 UTC] iam4webwork at hotmail dot com
[2012-06-22 00:33 UTC] rasmus@php.net
-Status: Open
+Status: Not a bug
[2012-06-22 00:33 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 21:00:01 2025 UTC |
Description: ------------ A float value of 19.99 * 100 when passed to intval becomes 1998 unless embedded in a string. Test script: --------------- $amount = 19.99 * 100; $test2 = intVal($amount); $test3 = intVal("$amount"); echo $test2 . "<br />\n"; echo $test3 . "<br />\n"; Expected result: ---------------- 1999 1999 Actual result: -------------- 1998 1999