Martín Marqués wrote:
I have values with 2 decimals that I multiple by 100 to make them
integers, but to be sure I do a cast using (int).
The thing is that (int) is changing the value of the integer. Here is
a var_dump of the original value, the value * 100, and the value after
casting to int.
Using floor() those the exact same thing.
Why is this?
echo serialize("34.80" * 100);
int simply chops it, hence 3479
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php