When i run the following PHP Script which is just calculating the discount of 30% from 11.5. I'll get some strange result. Normally i would expect the condition to be false when testing the calculated result. But instead i get true.
Whats wrong with php in this case?
<?php
$_discount = 30;
$_price = 11.5;
$_qty = 1;
echo $_result = ((1-$_discount / 100) * $_price); // the result is 8.05
echo $_result; // prints 8.05;
echo gettype($_result); // prints double
echo $_result !== 8.05; // returns 1 instead of 0
?>