|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-03-25 23:36 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 03:00:02 2025 UTC |
I am not the only one experiencing this problem.. plus it seems to round the number randomly for example echo sprintf('%.2f', '8.7586206896551724'); returns 10.00 the person who had this problem's post is here http://forums.gentoo.org/viewtopic.php?t=38470&highlight=sprintf