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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:30:59
Original
972 people have browsed it

编程程序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 "
";
?>

Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template