Re: Comparison PHP to Perl

From: Date: Tue, 06 Jan 2004 08:08:55 +0000
Subject: Re: Comparison PHP to Perl
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173829@lists.php.net to get a copy of this message
"Warren Vail" <warren@vailtech.net> wrote in message news:03ac01c3d421$a7b879c0$6401a8c0@comcast.net... > I am looking for a comparison of features supported by PHP vs those > supported by Perl. > [snip] Ah, this old chestnut. As someone who wrote a major application in Perl, and now (mostly) uses PHP, I can only reiterate what's been said a thousand times before: the language you choose depends on what features you want and the type of script you'll be writing. You've only identified session support as a requirement, and although PHP has native session support, Perl has similar functionality available via the Apache::Session CPAN module. Actually, this is true for almost all extra native functionality in PHP that Perl does not support -- it's there in Perl, but you need to download a CPAN module for it. Another example of this is PHP's native mail( ) support. (For the uninitiated, CPAN [http://www.cpan.org] is a fantastic collection of standardised Perl extensions with an easy install script that has evolved over many years). Unfortunately the same does not apply for PHP: although it has an impressive array of built-in functions (especially compared to Perl's paltry offering), if a particular feature is not handled natively then you'll probably have to write your own code to implement it. Although there *is* a CPAN equivalent in PHP called PEAR [http://pear.php.net] that boasts a decent number of modules (most of which are still in early development stages), PHP simply hasn't been around long enough attract as much module development as Perl. So in summary: list all the features you need and if PHP supports them all (or if a few are missing and PHP's ease-of-use and other benefits outweigh the cons) then go with PHP, otherwise take another look at Perl. For a list of PHP's features, take a look at the documentation ... it's very user-friendly. [http://www.php.net/manual/en/] You'll also find a ridiculously large number of articles online comparing PHP to Perl, just do a Google search such as: [http://www.google.com/search?q=php+perl+comparison] Hope it helps, Al

« previous php.general (#173829) next »