I'm issuing a strange behavior with intval in PHP 7.0
It seems like using intval
after a floating number computation returns wrong values.
Here's an example:
echo intval(920); // This prints 920 as expected
echo intval(9.2 * 100); // this prints 919!!!
Probably I'm misunderstanding the correct usage of intval
.
Can someone explain me why this happens?