Given this PHP code:
// total is 71.24 (float) $value = $total * 100; var_dump($value); $valuecast = (int)$value; var_dump($valuecast); settype($value, \'int
For float to int, I'd suggest round. This is to cater to IEEE float imprecision.