GetDotted Domains

Viewing Thread:
"Perl or PHP"

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.

Wed 14/08/02 at 18:53
Regular
Posts: 787
OK, which is quicker, Perl or PHP.

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.
Wed 14/08/02 at 20:31
Regular
"Devil in disguise"
Posts: 3,151
Nimco wrote:
> 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
Wed 14/08/02 at 19:18
Regular
Posts: 10,437
PHP most deffinately, I saw an example of how to do something in different languages. C was 4 times bigger than PHP and Perl was twice as big. It does seem a lot quicker.
Wed 14/08/02 at 19:18
Regular
"Eff, you see, kay?"
Posts: 14,156
PHP is almost always faster than PERL in almost all situations, especially when PHP is used as an ISAPI module, as any normal webserver would.
Wed 14/08/02 at 18:56
Regular
"It goes so quickly"
Posts: 4,083
From what I've heard PHP is faster :o).
Wed 14/08/02 at 18:53
Posts: 0
OK, which is quicker, Perl or PHP.

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.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Everybody thinks I am an IT genius...
Nothing but admiration. I have been complimented on the church site that I manage through you and everybody thinks I am an IT genius. Your support is unquestionably outstanding.
Brian
I've been with Freeola for 14 years...
I've been with Freeola for 14 years now, and in that time you have proven time and time again to be a top-ranking internet service provider and unbeatable hosting service. Thank you.
Anthony

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.