Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
199 B
1
Indexable
Never
function divide($dividend, $divisor)
{
    if ($divisor == 0) {
        throw new InvalidArgumentException("Division by zero"); // Guard clause
    }

    return $dividend / $divisor; // Main logic
}
Leave a Comment