>I am looking for a comparison of features supported by PHP vs those >supported by Perl. > >My gut tells me PHP is more robust, but we are trying to implement something >in a company that has long had a standard allowing Perl as a "sanctioned" >language, but current management does not want to fight for PHP as a new >"sanctioned" language (most managers there have never heard of PHP and the >resident Java zealots have almost established a monopoly).
PHP is designed to live in a web environment, so you'll probably find that almost any feature needed in the typical usage of a webserver will be at your fingertips. Your session example is a good one. So is automatic inclusion of GET and POST variables, or access to Apache headers, or availablity of interfaces to most databases, or projects such as PEAR that further ease the use of high level functionality like XML parsing. Personally, PHP's strongest advantage for me is its transparent integration with Apache, and the flexibility of using it in conjunction with mod_rewrite (for example). Preliminary experiments with Java servers such as Resin have left me with a profound sense of confusion at the litter of Servlet and WEB-INF directories, only marginally related to the URL needed to request them. Perl has a strong developer community, and tons of available modules and extensions for most imaginable purposes, but it was developed for efficient parsing of text files and it's not necessarily intended for use as an Apache module. I know of some very large, very busy applications that run on mod_perl, but then again I've seen the source and it's not pretty. >What would I lose by implementing in Perl (other than my mind)? Losing your mind is a pretty good argument against Perl - It's a great laguage, but its main strength (TMTOWDTI, a.k.a. There's More Than One Way To Do It) is also its biggest drawback. Some of the most collosal code headaches I've ever endured were the direct result of attempting to unravel the exertions of experienced Perl hackers, parsing through unending stretches of punctuation, following the implied "$_". OTOH, PHP's syntax is somewhat rooted in Perl, and it suffers from many of the same drawbacks, though it's vastly more approachable. The other extreme is Java, where it seems that every simple thing that would be a one-liner in Perl has to be contorted into a senseless OOP framework in the interest of reusability and portability. Anyway, if you're the only person pulling for PHP and there's a crew of Java toughs breathing down your neck, you may find that this is a losing battle for you. --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php