|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24237 number_format / printf problem
Submitted: 2003-06-17 23:03 UTC Modified: 2003-06-18 10:02 UTC
From: stiangarthus at hotmail dot com Assigned:
Status: Not a bug Package: *Math Functions
PHP Version: 4.3.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: stiangarthus at hotmail dot com
New email:
PHP Version: OS:


 [2003-06-17 23:03 UTC] stiangarthus at hotmail dot com
Have only experienced this problem on one server. Fresh php installation, standard php.ini.

Configure line: 
./configure' '--with-mysql=/usr/local/mysql' '--with-apache=/usr/local/src/www/apache_1.3.27' '--with-openssl=/usr' '--enable-track-vars' '--enable-force-cgi-redirect' '--with-gettext' 

Reproduce code:
$num = 4;
$num = number_format($num, 2);
echo "$num<br>";
$num = 4;
printf ("%.2f", $num);

Expected result:

Actual result:
0.00 <- code here <- phpinfo() here


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-18 10:02 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Unable to replicate, possibly the result of overoptimizations in gentoo.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 23:01:30 2024 UTC