Are there any potential pitfalls to be aware of when using the ceil function in PHP?

One potential pitfall to be aware of when using the ceil function in PHP is that it may not always return the expected result due to floating point precision issues. To avoid this, it is recommended to first multiply the number by a power of 10, apply the ceil function, and then divide by the same power of 10 to get the desired result.

$number = 10.555;
$power = 100; // Choose an appropriate power of 10 based on the desired precision
$roundedNumber = ceil($number * $power) / $power;
echo $roundedNumber; // Output: 10.56