RE: [PHP] PHP vs PERL

From: Date: Tue, 14 Nov 2000 14:57:48 +0000
Subject: RE: [PHP] PHP vs PERL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25188@lists.php.net to get a copy of this message
> > The PHP/JSP comment from Zeev the other day rings true here too - > anything you can do in one language, you can pretty much do in another. > (Well, that wasn't QUITE what was said, but that's the gist!) > > For performance, PHP as an Apache module is great, and personally > we've never had much luck setting up mod_perl under Apache. Biggest > benefit I can think of under Perl is CPAN - there are loads of modules to > do many things, and installing them is as easy as 'install Bundle::Apache' > (or whatever the module is). Dependancies are pretty much taken care > of, etc., which is a leg up on the PHP side of things. On the flip side, > there aren't that many cases where I've needed to do that sort of thing in > Perl OR PHP. > > require LWP::Simple; > > Then creating an LWP object, passing arguments, etc. is not as elegant > as > > $f = fopen("http://www.mydomain.com","r"); > > and reading from $f. > > As someone else mentioned, a lot of people (and sample code) uses CGI.pm. > This is a huge monster, imo, which is a lot of overkill for the limited > functionality > most people get out of it. PHP does many of the same things as CGI.pm > out of the box. > > I think that, written properly, PHP code will be more maintainable and > readable 6 months from now than Perl code. It's a bias, yes, but it's > a bias that has grown out of using both for the past few years. Perl has some advantages when you work on the 'border' of webscripts. Better process management, better IPC functionalities, more low-level networking operations, and when using mod_perl you can write apache handlers with it. Most people will never touch this and will be perfectly fine with PHP, that wins from perl when dealing with standard webscripting. Perl might not be very readable and can be downright cryptic, but it definitely has its uses - and works VERY quick. (I use it a lot for simple shell tools I gotta write and dont want to write in C.)

« previous php.general (#25188) next »