in reply to PHP vs. Perl for the 10,000th time

<humble><opinion>
   I will start off by saying i have done very little with PHP, but from what i have seen it is very good for CGI, but i have yet to see it used for non-CGI programming. This makes me wonder, am i the only non-CGI Perl programmer ? Do others not have batch processes ? hmmm ... i would wonder.
   Let us not forget, that while Perl is good for CGI, there was perl prior to CGI.pm, and it's uses span farther. I think the right tool for the job is always important, and sometimes i guess perl is a bit much (so, no need to load the perl interpreter to move one file from cron, shell might be better). If PHP is quicker for CGI, i do not contsest, but remember that the power of a language can come in handy during the scaling times. So, in short, i am sure people will argue this until they are a nice shade of maroon, and this will become a post as long as the Amazon, but if PHP is a better tool for the job, use it, but be mindfull (always) of the flexability of the solutions chosen.
</opinion></humble>
Thus spake the Master Programmer:
"When you have learned to snatch the error code from the trap frame, it will be time for you to leave."
-- The Tao of Programming

Replies are listed 'Best First'.
Re: Re: PHP vs. Perl for the 10,000th time
by xphase_work (Pilgrim) on Jul 27, 2001 at 16:25 UTC
    Don't worry, you are not the only one who uses perl for non-CGI programming. I mean, I use perl to maintain and support ADA, so beat that :)

    In response to your comments about PHP not being used for much other than CGI you are correct. PHP developers and advocates say that you can use it for non-CGI programming, and I have seen examples of this, but it has not caught on. Why? I'm not sure, I think it may be because that for non web applications, most people prefer perl, *sh, or python. Another reason why PHP is not used for non web applications is that perl is much superior in that respect. The reasons are CPAN, and a less focused language. PHP was developed mainly for web programming, while perl was developed for... um.... well, because Larry Wall was lazy I guess, which led to the wonderful world of CPAN and modules.

    Also, in response to the main node:

    Another thing to think about in your choice of a language for web development is security. Some of the basic, default behavior of PHP is(was) a security problem. I don't have any specific evidence at the moment, but I know there were several big security issues regarding PHP. These issues don't apply to well designed sites, but were very easy for beginners to make.

    I'm not saying that perl is better than PHP, or that PHP shouldn't be used, I'm just saying use whichever language suits your needs, and you feel more comfortable to use for programming a secure environment

    --xPhase