1

I came across an interesting fact, but do not quite understand why this is so:

$result = (int)((0.1+0.7)*10);
echo $result; // print 7

Why 7, not 8?

maximkou
  • 5,252
  • 1
  • 20
  • 41

0 Answers0