|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-02-11 08:25 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2018-02-11 08:25 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
Description: ------------ Calculation results in number different from what can be seen (and what should be). Happens with 2263.20 or 2263.70 in the presented script example. Test script: --------------- <?php $order_total = '2263.20'; $order_total_nocents = $order_total * 100; echo $order_total . ' '. (int) $order_total . ' ' . $order_total_nocents . ' '. (int) $order_total_nocents; if ( $order_total_nocents != "226320" && $order_total_nocents != 226320 ) { echo '<br />Error! '. $order_total_nocents; } Expected result: ---------------- 2263.20 2263 226320 226320 Actual result: -------------- 2263.20 2263 226320 226319 Error! 226320