Ask the Expert

Perl, Python, PHP: Which is better?

Between Perl, Python and PHP, is one better than the other? I've heard that there are security risks involved in using PHP. Is that right? Why are these scripting languages included in what's being called the LAMP stack?

    Requires Free Membership to View

You've stepped into one of the great open source religious wars! Each scripting language has its fervent advocates. I would say each of them is excellent. My firm uses Perl quite extensively and find that it's great. One of the fantastic advantages of these languages is that they all have many special-purpose modules available for use by anyone -- these modules can really cut down a lot of the work you might have to do to create an application. Many Perl programs are nothing more than a number of module calls pasted together with bits of code -- which may account for Perl being called "the duct tape of the Internet!" However, PHP and Python are also great languages.

Regarding PHP security risks, I would say they're no worse than the other languages you mention. Any language can pose security risks if care is not taken, but PHP is not to my knowledge any risker than Python or Perl.

As to why they're part of the default open source stack -- well, because they're so handy and are good for quick creation and modification opf programs, they are a very useful part of the open source toolkit. Because they are so useful, they got included in the default stack. We're just lucky they all start with the letter "P!"

This was first published in February 2005

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: