PHP 5.6.31 Released

Voting

Please answer this simple SPAM challenge: two minus zero?
(Example: nine)

The Note You're Voting On

omnibus at omnibus dot edu dot pl
6 years ago
Beware strange behaviour if number is negative and precision is bigger than the actual number of digits after comma.

round(-0.07, 4);

returns

-0.07000000000000001

So if you validate it against a regular expression requiring the maximum amount of digits after comma, you'll get into trouble.

<< Back to user notes page

To Top