The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Assume that PHP is compiled as a CGI module rather than as part of Apache.
I don't know if it matters about the task, if so, what happens on a simple loop that feeds data to the browser, e.g. (in PHP):
for($i=0; $i<=1000; $i++)
{
echo $i . "
";
}
?>
I would test it myself but I can't seem to get a perl script to do it properly - the results of this post will tell me whether it is worth learning perl or just sticking with PHP.
> OK, which is quicker, Perl or PHP.
The answer is, depends what website you read. :)
Ask any PHP programmer and they'll swear on their life that PHP is king. :)
However, thats usually blind faith rather than any real knowledge.
For the example you've given, languages makes no difference. I just timed it in both perl and php, the execution speed isn't big enough to measure. I increased the loop size significantly, and perl came out with a smaller speed. Debatable as to whether thats a valid benchmark of course.
Honestly, the speed difference isn't worth worrying about unless you're planning any large scale projects. I'd certainly never choose between the 2 because of speed, maybe perhaps because of more rapid development with PHP, but thats a different question.
-G
Assume that PHP is compiled as a CGI module rather than as part of Apache.
I don't know if it matters about the task, if so, what happens on a simple loop that feeds data to the browser, e.g. (in PHP):
for($i=0; $i<=1000; $i++)
{
echo $i . "
";
}
?>
I would test it myself but I can't seem to get a perl script to do it properly - the results of this post will tell me whether it is worth learning perl or just sticking with PHP.