ID:               49254
 User updated by:  stakadush at yahoo dot com
 Reported By:      stakadush at yahoo dot com
 Status:           Bogus
 Bug Type:         Math related
 Operating System: Ubuntu 9.04 & OS X 10.5.7
 PHP Version:      5.3.0
 New Comment:

hey

this was not the case in 5.2 (i've verified with latest 5.2.10), and
the documentation doesn't say 
anything about this either. actually, for the function from the example
(abs) it says the return 
value will be either integer or float - but a string is being
returned.

also in the setlocale documentation there's no mentioning of this
behavior, or a behavior change 
from 5.2.

setlocale should (and until 5.2 did) affect only functions which are
used for display, such as 
number_format - where you'd expect this.

anyway, how helpful is it when you need to do calculations? it's only
useful for display purposes. 

please recheck/reconsider.
thanks. :)


Previous Comments:
------------------------------------------------------------------------

[2009-08-17 09:40:20] [email protected]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php



------------------------------------------------------------------------

[2009-08-14 14:49:35] stakadush at yahoo dot com

Description:
------------
setlocalte affects the return of math functions, making them unusable.
in this example the dot is being replaced with the italian comma 
notation.

Reproduce code:
---------------
setlocale(LC_ALL, 'it_IT.UTF-8');

echo abs(-5.5);

Expected result:
----------------
5.5

Actual result:
--------------
5,5


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49254&edit=1

Reply via email to