private function x($d, $m, $over)
    {
        if ($d > $over) {
            return PHP_INT_MAX;
        }
        if ($d < -$over) {
            return -PHP_INT_MAX -1;
        }
        return $d * $m;
    }
private function x($d, $m, $over)
    {
        if ($d > $over) {
            return PHP_INT_MAX;
        }
        if ($d < -$over) {
            return -PHP_INT_MAX -1;
        }
        return $d * $m;
    }
private function x ( $ d , $ m , $ over ) { if ( $ d > $ over ) { return PHP_INT_MAX ; } if ( $ d < - $ over ) { return - PHP_INT_MAX - 1 ; } return $ d * $ m ; }
Scale d by m, checking for overflow.
This has a short name to make code more readable.

@param int $d
@param int $m
@param int $over
@return int
Scale d by m checking for overflow . This has a short name to make code more readable .