找出比N小的最大质数

给一个数N,找出比N小的最大的质数

1;$i--){
		if(isPrime($i)){
			return $i;
		}
	}
	return 'not find!';
}

echo getPrime(2);


你可能感兴趣的:(PHP)