What are common pitfalls when handling numeric values in PHP?

One common pitfall when handling numeric values in PHP is comparing floating-point numbers for equality due to precision issues. To avoid this, you can use the `round()` function to round the numbers to a specific precision before comparing them.

$num1 = 0.1 + 0.2;
$num2 = 0.3;

if (round($num1, 2) == round($num2, 2)) {
    echo "The numbers are equal.";
} else {
    echo "The numbers are not equal.";
}