PHP 8.5.0 Alpha 1 available for testing

Voting

: seven plus one?
(Example: nine)

The Note You're Voting On

pierpaolocira
8 years ago
Be aware the last tofloat($num).

In theory it is very useful to have a function "separator-agnostic" (I think "locale based" solutions are useless if you have to parse a user file that can have a locale different to the server).

But this can lead to misinterpretations; in short: "123,456" is "123.456" (so comma used as decimal separator) or "123456" (comma used as thousand separator).

In any case, if you really want to use it, please don't forget that this function doesn't manage negative numbers.

<< Back to user notes page

To Top