tags:

views:

46

answers:

1

I tried to run the following code on the php console of a development server and a production server, and got the expected ("10.01") results on both console.

var_dump(number_format('10.005',2,'.',''));
string(5) "10.01"

But when I execute the application code that uses the number_format call on the production server, I got "10.00", when on the development server, I got "10.01".

Here is my question, what could affect the result when the two server are using the same code and database (Same mysqldump and svn revision).

Server information:

Development server: Os: Ubuntu 10.04, processor: Intel Core 2 Duo [email protected]
Production server: Os: CentOS release 5.3, Processors: Intel(R) Xeon(TM) CPU 3.00GHz

A: 

From the received comments, I must conclude that the error is server side. 64-bit vs 32-bit. I see no other explanations until someone can provide another feedback.

yvoyer