update page now

Voting

: min(two, three)?
(Example: nine)

The Note You're Voting On

chmielewski dot thomas at gmail dot com
11 years ago
<?php

function divide($divident, $divisor) {
    if(!is_numeric($divident) || !is_numeric($divisor)) {
        throw new InvalidArgumentException("Function accepts only numeric values");
    }
    if($divisor == 0) {
        throw new DomainException("Divisor must not be zero");
    }
    return $divident / $divisor;
}

<< Back to user notes page

To Top