Question:
What are the differences between Perl, Python and PHP?
Waldo
2009-02-17 11:52:16 UTC
I've checked wikipedia and everything, but I'm just looking for a more straightforward, one or two sentence explanation of each. Any help would be appreciated!
Three answers:
fritteritter
2009-02-18 20:56:23 UTC
Perl is a general purpose scripting language which is fabulous to know when you want to write quick one-liner scripts to do complex string transformations or other tasks. It has a wonderful development community and thousands of modules which make it very easy to do extremely complex things in a few lines. Perl will usually be slower than PHP or Python in a web application environment - but if you want to use Perl with Apache, then mod_perl is a blazing fast alternative. The syntax is extremely flexible, making it easy to be creative and shoot yourself in the foot.



PHP is just not very useful outside of web apps. The documentation for the hundreds of builtin functions is good, but it is often much more difficult to find and install quality PHP modules than in Perl and Python. The builtin functions make it very easy to do most web-related tasks where you would need to find the proper module in Perl and Python.



Python is also a general purpose language but it is often better suited for logic programming than convenience scripting. It is usually faster than PHP and Perl, can be compiled unlike the others, and has the most straightforward syntax. Some Python stuff seems to lack the quality documentation found in Perl which has made it a bit slower to learn than Perl for me (specifically, mod_python vs. mod_perl).
David D
2009-02-17 11:56:25 UTC
The differences are vast and need books to explain. They can't be summed up in one or two sentences.



Update: There is very little difference in what they are used for - except that PHP is used less outside server side web programming then the others.
tebar
2016-09-11 09:24:03 UTC
a million] Servlet is a natural java magnificence..while jsp isn't. two] We can placed HTML Code within servlets and jsp. three]after we use HTML in java code than it's known as servlet and after we use Java code is html thsn it's known as jsp four]servlet is static wherein as jsp is static


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...