Are there any potential pitfalls to be aware of when manipulating floating point numbers in PHP?

When manipulating floating point numbers in PHP, one potential pitfall to be aware of is the issue of precision loss due to the inherent nature of floating point arithmetic. This can lead to unexpected results when performing calculations involving floating point numbers. To mitigate this issue, it is recommended to use the PHP `number_format()` function to round the result to a specified number of decimal places.

$number1 = 0.1;
$number2 = 0.2;

$result = $number1 + $number2;

// Round the result to 2 decimal places
$rounded_result = number_format($result, 2);

echo $rounded_result;