CGI Q: What's the reason for PHP to be better than other CGI? Is there more specific data to prove that PHP performs well with other CGI execution? Now my company is using C to write CGI, if the switch to PHP, will it be better? Without strong and powerful basis, I can not convince the above people to let me into PHP ...
A:
I think "good" has to be three points
First: The written program executes fast.
Second: Performance is strong when there is a large amount of access.
Third: The program development time is fast, easy to maintain.
PHP in these three points, although not necessarily the best, but also in the forefront of
The following is a comparison of c,php and Perl in terms of speed
I test
with the following formula
$s = 1.0;
for ($i =1 $i <=10; $i + +) {
for ($j =1 $j <=10; $j + +) {
$s = $s *1.0005;
$s = $s/1.0004;
};
};
print $s;
?>
then use ab-n 10000-c http://mycgi
Test, Results
The
C language took 37.511 seconds
PHP3 in 45.393 seconds
Perl took 68.418 seconds
looks to be c the fastest yes, however, and PHP3 results are not too big
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.