Check if a phone number has at least 8 numbers.

<p>Really rough guesstimate.</p>

@param $telephone

@return bool
193904
public static function isValidTelephoneNumber($telephone){

		$numbers = str_split($telephone);
		$nums = [];

		foreach($numbers as $number){

			if(ctype_digit($number)){

				$nums[] = $number;
			}
		}

		if(count($nums) > 8){

			return true;
		}

		return false;
	}
368658
protected function phone($key) : bool
    {
        $num = preg_replace('/d+/', '', (int) $this->param[$key]);

        $conCate = '';
        $columnName = ucfirst($this->convertToFieldName($key)).' should be ';
        if (isset($this->errors[$key.self::ERROR])) {
            $conCate = str_replace('.', '', $this->errors[$key.self::ERROR]).' and ';
            $columnName = '';
        }

        if (in_array(strlen($num), $this->validPhoneNumbers) == false) {
            $this->errors[$key.self::ERROR] = $conCate.$columnName.'valid phone number.';

            return false;
        }

        return true;
    }
733133
public function validate($code): bool
    {
        $codeLength = strlen($code);

        return ctype_digit($code) && $codeLength == $this->config['total_digits'] && strlen($code) <= 6;
    }
740095
protected function isPerfectNumber($number)
    {
        $d = 0;
        $max = \sqrt($number);
        for ($n = 2; $n <= $max; ++$n) {
            if (!($number % $n)) {
                $d += $n;
                if ($number / $n !== $n) {
                    $d += $number / $n;
                }
            }
        }

        return ++$d === $number;
    }
1128341
function DetectWindowsPhone8()
   {
      if (stripos($this->useragent, $this->deviceWinPhone8) > -1)
         return $this->true; 
      else
         return $this->false; 
   }
573210
public function cardNumber($value): bool
    {
        if (!is_string($value) || strlen($value) < 12) {
            return false;
        }

        $result = 0;
        $odd = strlen($value) % 2;
        preg_replace('/[^0-9]+/', '', $value);

        for ($i = 0; $i < strlen($value); ++$i) {
            $result += $odd
                ? $value[$i]
                : (($value[$i] * 2 > 9) ? $value[$i] * 2 - 9 : $value[$i] * 2);

            $odd = !$odd;
        }

        // Check validity.
        return ($result % 10 == 0) ? true : false;
    }
666451
public function equals($number): bool
    {
        if (!($number instanceof Number)) {
            return false;
        }
        
        return $this->number === $number->number;
    }
1332947
public function isOk($caller = null) {
		foreach ($this->conditions as $condition) {
			if (!$condition->isOk($caller)) {
				return false;
			}
		}
		return true;
	}
1253865
public function hasContacts(array $contacts): bool
    {
        foreach ($contacts as $contact) {
            if (!$this->hasContact($contact)) {
                return false;
            }
        }

        return true;
    }
871897
private static function isValidChecksum($number)
    {
        $map = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 4, 6, 8, 1, 3, 5, 7, 9);
        $sum = 0;
        $last = strlen($number) - 1;
        for ($i = 0; $i <= $last; $i++) {
            $sum += $map[$number[$last - $i] + ($i & 1) * 10];
        }

        return ($sum % 10 == 0);
    }
243371
public function detect($number)
    {
        foreach (self::$cardPatterns as $name => $pattern) {
            if (preg_match($pattern, $number)) {
                return $name;
            }
        }

        return false;
    }
90827
public function hasMethodCall($method)
    {
        foreach ($this->calls as $call) {
            if ($call[0] === $method) {
                return true;
            }
        }

        return false;
    }
1248861
public function isCallable($task)
    {
        // Check for container bindings
        if (is_array($task)) {
            return count($task) === 2 && ($this->container->has($task[0]) || is_callable($task));
        }

        return is_callable($task) && !$task instanceof Closure && !$task instanceof SerializableClosure;
    }
500982
public function hasDigit($digit)
    {
        try {
            $this->digits->getValue($digit);
        } catch (DigitList\InvalidDigitException $ex) {
            return false;
        }

        return true;
    }
816061
public function phone($val, $id) {
        $val = preg_replace('/[^0-9]/', '', $val);
        if (strlen($val) != 7 && strlen($val) != 10) {
            $this->add($id, 'Please enter a valid 7 or 10 digit phone number.');
            return false;
        }

        return true;
    }
488835
public static function tel($tel)
    {
        if (preg_match("/^(\+\d{2}|)\s?(\(?0?\d{2}\)?|)\s?(9?)\s?(\d{4})[\s\-]?(\d{4})$/", $tel, $matches)) {
            return ($matches[1] !== '' ? $matches[1] . ' ' : '')
                 . ($matches[2] !== '' ? implode('', array_diff(str_split($matches[2]), ['(',')'])) . ' ' : '')
                 . $matches[3]. $matches[4] . '-' . $matches[5];
        }
        return false;
    }
178561
public function setPhone($phone)
    {
        if (!empty($phone) && is_string($phone) && ctype_print($phone)) {
            $this->phone = trim($phone);
        }

        return $this;
    }