|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2018-09-25 13:42 UTC] ozgur at end dot com dot tr
 Description: ------------ $usd_DS = 5.1254; $topluyoruz = $usd_DS * $stokbilgi['fiyat'] * $oku['uretimadet']; not working code vs $topluyoruz = 5.1254 * $stokbilgi['fiyat'] * $oku['uretimadet']; working code Test script: --------------- $usd_DS = 5.1254; $topluyoruz = $usd_DS * $stokbilgi['fiyat'] * $oku['uretimadet']; not working code vs $topluyoruz = 5.1254 * $stokbilgi['fiyat'] * $oku['uretimadet']; working code Expected result: ---------------- $usd_DS = 5.1254; $topluyoruz = $usd_DS * $stokbilgi['fiyat'] * $oku['uretimadet']; not working code vs $topluyoruz = 5.1254 * $stokbilgi['fiyat'] * $oku['uretimadet']; working code Actual result: -------------- $usd_DS = 5.1254; $topluyoruz = $usd_DS * $stokbilgi['fiyat'] * $oku['uretimadet']; not working code vs $topluyoruz = 5.1254 * $stokbilgi['fiyat'] * $oku['uretimadet']; working code PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Thu Oct 30 18:00:02 2025 UTC | 
As Peehaa - it's hard to know what you're reporting. I suspect you're getting tripped up by debugging something after echoing out a value, that has been rounded, and then expecting the rounded value to have the same output as the exact value. ini_set('precision', "11"); $a = 35; $b = -34.99; echo $a + $b; echo "\n"; ini_set('precision', "17"); echo $a + $b; echo "\n"; Using the output of 0.01 obviously doesn't give the same result as using the output of 0.0099999999999980105