Bug #80241 [NEW]: Casts double to int

From: Date: Thu, 15 Oct 2020 14:30:35 +0000
Subject: Bug #80241 [NEW]: Casts double to int
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229646@lists.php.net to get a copy of this message
From: dmitrijlin9 at gmail dot com Operating system: Windows 10 PHP version: 7.4.11 Package: Scripting Engine problem Bug Type: Bug Bug description:Casts double to int Description: ------------ I'm trying to cast double variable to int, but i have wrong answer Test script: --------------- $a = '2166.99'; echo (int)($a *100); Expected result: ---------------- 216699 Actual result: -------------- 216698 -- Edit bug report at https://bugs.php.net/bug.php?id=80241&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80241&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80241&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80241&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80241&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80241&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80241&r=support Expected behavior: https://bugs.php.net/fix.php?id=80241&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80241&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80241&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80241&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80241&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80241&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80241&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80241&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80241&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80241&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80241&r=mysqlcfg

« previous php.bugs (#229646) next »