Problem solve Get help with specific problems with your technologies, process and projects.

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?
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!"

Dig Deeper on Linux servers

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.