9) { $digit -= 9; } } // Total up the digits $total += $digit; } // If the total mod 10 equals 0, the value is valid return $total % 10 === 0; } }