Me and my colleges were discussing the following problem, and although we came up with some theories we are still seeing it very odd...
<?php
echo (int) ((0.1 + 0.7) * 10);
?>
outputs 7
whilst
<?php
echo (int) (0.1 + 0.7) * 10;
?>
outputs 8 (as expected and as would output if you do it with a calculator)
Could the (int) be causing the issue here? Anyone have an idea?
Thanks a lot and Good Day!