I have used both Perl and PHP in the past several years. They each have their strong points. Those who tell you that PHP is far better for most web programming are probably used to small sites or sites with limited functionality. I have heard the debate often in the different "strategy" sessions.
What it really boils down to is what is your application? Are you looking at maintaining a system of applications that are going to intertwine (try writing glue code with PHP) or are you writing a bunch of simple web pages never to be revisited again.
The problem with the claim that PHP is best for most web pages is evident in the claim itself. From the perspective of a single web page, PHP is indeed simpler for the inexperienced. (Personally, writing web pages is simple in most languages for simple web pages if you know the language). However, the reality is that most web pages are part of a Web Application. Whether it be a reporting tool, a client support tool or something else. These applications typically require working with outside libraries as well as being able to write semi-complicated code. This is not something I have seen as being easier in PHP.
Another important point to consider is where will this be in 6 months, 1 year? Which language gives you the most flexibility in the future? PHP looses big time here. Try switching Databases. Major rewrite in PHP. Perl is a more powerful and flexible language.
One of the complaints PHP evangelists give is that there are too many ways to do a thing in Perl. What they miss is that it is much more likely that a Perl programmer will develop a working solution for a hard problem than a PHP prorammer because Perl lends itself to *how you think*. That is dismissed by many programmers as an open invitation to sloppy code. That any programmer would claim this shows (IMO) a lack of real world experience. I have not seen any language that forced clean, intelligible coding. Only programmers (and good managers). Try reading garbled C, C++ or Java (highly structured languages.) - you may Perl obfu not so obfu.
Several people above stated some good reasons to go with Perl. Look at the road you are going to travel down. Think about the possible future. If any degree of complexity, glueing or other interprocess communications are required, Perl is the answer. If on the other hand, the whole system will never move to another DB, never be more than simple pages and forms, never link up with external apps, ... go PHP (and good luck in the future).
In reply to Re: Perl vs. PHP
by Anonymous Monk
in thread Perl vs. PHP
by jerrygarciuh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |