What potential issues can arise when dividing by zero in PHP calculations?

Dividing by zero in PHP calculations can result in a "Division by zero" error, which will halt the execution of the script. To avoid this issue, you can check if the divisor is zero before performing the division operation and handle it accordingly, such as displaying an error message or returning a default value.

$dividend = 10;
$divisor = 0;

if ($divisor != 0) {
    $result = $dividend / $divisor;
    echo "Result: " . $result;
} else {
    echo "Error: Division by zero.";
}