CGI/PERL vs. PHP, which one is better?
what are the PRO's and CON's of PERL vs. PHP?
I already know CGI/PERL but know a little PHP, and i was wondering which one you think is better, and why? i have heard that PHP is more secure than CGI/PERL, but not sure.
any seggestions/comments/oppinions?
Re: CGI/PERL vs. PHP, which one is better?
Use Python...;)..faster and easier...;)
Re: CGI/PERL vs. PHP, which one is better?
i dont think my host supports Python, plus i have never heard of it (now i feel TechDumb)
Re: CGI/PERL vs. PHP, which one is better?
Well well, your host should use it. We have thrown away all Perl and PHP scripts and rewritten them to Python and all new stuff is written in Python here..:)
Well, then I don't have a suggestion for you after all..:)
Re: CGI/PERL vs. PHP, which one is better?
Well, I perfer to use PHP when I can - I think its easier and faster :)
Although, I do agree Python would be the even better :)
Cheers,
RyanJ
Re: CGI/PERL vs. PHP, which one is better?
PHP is faster, and you can't/wouldn't want to get much easier than that.
Re: CGI/PERL vs. PHP, which one is better?
I've said it before and I'll say it again - you should always choose the tool which is most adequate in solving your problem. A construction worker for example would not use a mallet to hammer metal nails into wood, even if he does quite like the mallet.
Compared to CGI, PHP is not secure, Perl is also more secure than PHP. PHP's biggest strength is that it is easy to learn and extremely flexible; in turn making it very powerful. Another thing that makes PHP more attractive than Perl is the fact that it is designed with web development in mind and is hence a HTML embedded language. You can always tell a Perl programmer who has moved to PHP because they use loads of echo statements to produce HTML when they don't need to ;)
Like PHP, Perl is also very powerful. It has also been around a lot longer and its development cycle is slower than PHP. As such, many see Perl as a more stable and secure option. Perl is not just a web scripting language, its main focus is on the processing of text/strings (Perl regular expressions being one of the geniuses that has found its way into other technologies such as PHP and Java). Being focused on text, Perl is also ideal for command line applications.
CGI is a specification. A set of rules by which a script / program must use to interface with a web server in order to be able to handle web requests. The Perl interpreter runs as a CGI, PHP can also be configured to run as a CGI. CGI programs can be written in any language. This makes it ideal when your requirements are specific: For example you may want an application which is very secure - so you may choose to write it in C and pay close attention to all variables and memory allocations. You may want something which is fast, so you could choose to write portions of it in assembler. Maybe you are interfacing with a hardware or a software application which requires a specific language.
For developing web applications with back end databases, in general I would choose PHP. :)
P.s: Moved to the General Developer Forum
Re: CGI/PERL vs. PHP, which one is better?
Quote:
Originally Posted by visualAd
For example you may want an application which is very secure - so you may choose to write it in C and pay close attention to all variables and memory allocations. You may want something which is fast, so you could choose to write portions of it in assembler. Maybe you are interfacing with a hardware or a software application which requires a specific language.
Just as a note to that. In Python you can call self made C modules too...;)
Re: CGI/PERL vs. PHP, which one is better?
Quote:
Originally Posted by visualAd
I'vYou can always tell a Perl programmer who has moved to PHP because they use loads of echo statements to produce HTML when they don't need to ;)
I know i do that all the time :o