What does "warning: division by zero" mean in php?

Example:

$result = 10 / 0;
This warning arises when you attempt to divide a number by zero, which is mathematically undefined.

Solution:

if ($denominator != 0) {
    $result = 10 / $denominator;
} else {
    echo "Cannot divide by zero";
}

Beginner's Guide to PHP