ID: 31877
User updated by: kalle at ok dot ee
Reported By: kalle at ok dot ee
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: linux 2.4.28
PHP Version: 4.3.10
New Comment:
I have to admit, that I was stupid :(
In previous versions PRINTF() returned true/false or nothing. From some
versions on it returns number of characters printed. And <?=PRINTF();?>
is not right, <?PRINTF();?> or <?=SPRINTF();?> is.
Sorry everyone. But that return string was confusing :)
Conclusion - overworking makes deamons appear..
Previous Comments:
------------------------------------------------------------------------
[2005-02-07 22:11:25] kalle at ok dot ee
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"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31877&edit=1