- Output for 5.6.0 - 5.6.29, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.29, 8.2.0 - 8.2.21, 8.3.0 - 8.3.9
- 0 1000 is not float 1000
<?php
$price = 1080;
$taxrate = 1.08;
$rewrite = $price / $taxrate;
$floatflag = ($price * 100) % ($taxrate * 100);
print_r ($floatflag . "\n");
print_r ($rewrite . "\n");
if($floatflag != 0){
$rewrite = floor($rewrite);
print_r ("is float \n");
} else{
print_r ("is not float \n");
}
print_r ($rewrite);