Name: Anonymous 2009-09-10 0:08
During tests (sleep(1)) I observed that average memory usage for PHP script is 3.5 times higher than Perl (0.7% vs 0.2%) while CPU usage for PHP script (1.3%) is more than 13 times higher than Perl (less than 0.1%). It's well-known that PHP needs more resources than Perl, this I just proved in my small test.
Perl is more stable than PHP. First, stable Perl 5.0 version is developing since 1995, the most current versions (5.6.0 and up) are developing since Mar 2000. PHP 3.0 appeared in 1998 while most popular 4.0 stable version appeared in May 2000. Since spring 2000 we got more than 15 stable releases of PHP4 and only 6 stable releases of Perl. If you view changelogs you'll see that PHP changes are mostly bugfixes, while Perl changes are mostly feature enhancements. Another problem is that PHP versions are not 100% backward compatible. So constant releases + no backward compatibility = shit.
Sure PHP is as wide-spread as Perl, but let's be realistic: different webhosts have different PHP versions with their own settings. Providing PHP versions of my scripts I deal with about 10 different versions of PHP, some hosts were even running PHP3. Unfortunately, different PHP versions are not 100% compatible, so neither you, nor developer can be absolutely sure that your script would be working after you'll transfer it to another webhost.
The next problem for you can be PHP configuration. Since PHP is not as universal as Perl most number of features can be switched on or off not in your script, but during PHP (or mod_php) compile time, or in ini-file, or in apache configuration files. Usually you would be unable to do this on virtual servers. For some reasons you may not want to perform these operations on dedicated server too. What you may theoretically loose: file uploads, error tracking, include directories support and many others.
One may ask about Perl modules that are needed by the scripts, but may be unavailable at web server. The answer would be easy: frequently-used Perl modules (like CGI, LWP etc) often come with Perl distribution, so you may find them on near 100% of servers running Perl. Webhosting companies running MySQL on their servers usually have appropriate DBI modules loaded too. Moreover I noticed that webhosting support prefers installing Perl modules rather than recompiling software or changing configuration files.
Perl is more stable than PHP. First, stable Perl 5.0 version is developing since 1995, the most current versions (5.6.0 and up) are developing since Mar 2000. PHP 3.0 appeared in 1998 while most popular 4.0 stable version appeared in May 2000. Since spring 2000 we got more than 15 stable releases of PHP4 and only 6 stable releases of Perl. If you view changelogs you'll see that PHP changes are mostly bugfixes, while Perl changes are mostly feature enhancements. Another problem is that PHP versions are not 100% backward compatible. So constant releases + no backward compatibility = shit.
Sure PHP is as wide-spread as Perl, but let's be realistic: different webhosts have different PHP versions with their own settings. Providing PHP versions of my scripts I deal with about 10 different versions of PHP, some hosts were even running PHP3. Unfortunately, different PHP versions are not 100% compatible, so neither you, nor developer can be absolutely sure that your script would be working after you'll transfer it to another webhost.
The next problem for you can be PHP configuration. Since PHP is not as universal as Perl most number of features can be switched on or off not in your script, but during PHP (or mod_php) compile time, or in ini-file, or in apache configuration files. Usually you would be unable to do this on virtual servers. For some reasons you may not want to perform these operations on dedicated server too. What you may theoretically loose: file uploads, error tracking, include directories support and many others.
One may ask about Perl modules that are needed by the scripts, but may be unavailable at web server. The answer would be easy: frequently-used Perl modules (like CGI, LWP etc) often come with Perl distribution, so you may find them on near 100% of servers running Perl. Webhosting companies running MySQL on their servers usually have appropriate DBI modules loaded too. Moreover I noticed that webhosting support prefers installing Perl modules rather than recompiling software or changing configuration files.