What’s the best way to get the fractional part of a float in PHP?

$x = $x - floor($x)

Leave a Comment