|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-02-08 07:49 UTC] kalle at ok dot ee
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 22 16:00:01 2025 UTC |
Description: ------------ new installation (server, apache, PHP). apache 1.3.33, PHP 4.3.10, slackware current. in previous server there were no problems. but now PRINTF returns total garbage: for example: <?=PRINTF("%.2f", (10/4));?> returns "2.504" <?=PRINTF("%.2f", 10.00);?> returns "10.005" <?=PRINTF("%.2f", 10);?> returns "10.005" <?=PRINTF("%.2f", 125.00);?> returns "125.006" disabled all Zend extension and googled a long time. no solution for me. dev team? any ideas? thanks in advance! Reproduce code: --------------- <?=PRINTF("%.2f", (10/4));?> returns "2.504" <?=PRINTF("%.2f", 10.00);?> returns "10.005" <?=PRINTF("%.2f", 10);?> returns "10.005" <?=PRINTF("%.2f", 125.00);?> returns "125.006" Expected result: ---------------- <?=PRINTF("%.2f", (10/4));?> returns "2.50" <?=PRINTF("%.2f", 10.00);?> returns "10.00" <?=PRINTF("%.2f", 10);?> returns "10.00" <?=PRINTF("%.2f", 125.00);?> returns "125.00"