[thelist] PHP vrs Perl - 15 rounds

Kelly Hallman khallman at ultrafancy.com
Mon Mar 8 13:26:54 CST 2004


On Sun, 7 Mar 2004, Ken Moore wrote:
> Let's start a real brawl here. Which is better, PHP or Perl, and why?
> I really want to know which is better with MySQL on a web site.

I know both Perl and PHP pretty well. I started out using Perl for CGI 
programming but never went back once I learned PHP.

Perl is stellar for writing the occassional down-and-dirty sysadmin or
text-manipulation script (and I still use it for this), but gets ugly
quick when you try to handle more complex programming tasks with it.

References and passing complex data structures in and out of functions is 
a total mess in Perl, as well as the interface for writing modules.

Perl feels like all the useful symbols were used up as syntax early on,
which later caused serious problems when more advanced language features
were bolted on (they feel very much like afterthoughts). As a result,
trying to utilize those language features is a very painful experience...

The only argument for Perl CGI programming comes when you've got a bunch
of extra installation-specific Perl modules installed.. which makes your
code much less portable... vs. PHP which does most things out of box...

Perl is more of a general-purpose language than PHP, so it's a bit of an 
apples and oranges situation, but for the web I'd always choose PHP...

-- 
Kelly Hallman
// Ultrafancy



More information about the thelist mailing list