"/> ">

Home >Backend Development >PHP Tutorial >编程-求解析下面这个php程序,感觉这个程序效率很低,求解答。

编程-求解析下面这个php程序,感觉这个程序效率很低,求解答。

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-02 11:30:59969browse

编程程序php网页

$ss = 2;
$max = 1000;
$arr = array();
echo $max."以内的素数为:";
while ($ss $boo = false;
foreach ($arr as $value):
if ($ss % $value == 0):
$boo = true;
break;
endif;
endforeach;
if (!$boo):
echo $ss." ";
$arr[count($arr)] = $ss;
endif;
$ss++;
endwhile;
echo "
";
?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn