Maybe it will be better but overall the php manual says
<?php
$num = pi();
echo (int) ($num * 10); // prints 31, not 30
?>
Note that this does the same thing and returns 31 as desired:
<?php
$num = pi();
echo intval($num * 10); // prints 31, not 30
?>
that this two syntax gave you the same result. Then I will try this one, that you gave me and will see the differencies.
Laz