#22887 [Fbk->Opn]: sprintf( "%.2f", 10.75 ); returns "0.00"
| From: | josh at chatgris dot com | Date: | Fri, 28 Mar 2003 03:44:52 +0000 |
| Subject: | #22887 [Fbk->Opn]: sprintf( "%.2f", 10.75 ); returns "0.00" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-36636@lists.php.net to get a copy of this message | ||
ID: 22887
User updated by: josh at chatgris dot com
Reported By: josh at chatgris dot com
-Status: Feedback
+Status: Open
Bug Type: Scripting Engine problem
Operating System: Gentoo Linux /w apache2
PHP Version: 4.3.1
New Comment:
I built it with the lastest snapshot (phpinfo said it was
4.3.2-RC) and the exact same problem is occuring.
I have also made a sample C program to test the output of
printf and it works in the C program. So it's definately
something to do with php.
Anything else I can do to help you guys figure this out?
Josh.
Previous Comments:
------------------------------------------------------------------------
[2003-03-26 09:25:30] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Cannot verify using Apache 2 either, if latest snapshot still has this
problem, please include your configure line for PHP in your reply.
------------------------------------------------------------------------
[2003-03-26 00:28:12] rasmus@php.net
Works just fine from in CLI and Apache1. Don't have an
Apache2 server handy for testing this.
------------------------------------------------------------------------
[2003-03-25 23:36:21] josh at chatgris dot com
Sample script
<?php
echo sprintf( "%.2f", 10.75 );
?>
returns 0.00
this is NOT the expected behaviour.
Using apache2, not tested on apache1.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22887&edit=1