I've done quite a bit of work with PHP. Still do a fair amount. It is great for the majority of web work out there, because it does a lot of the work for you. It is a language specifically tailored for web work, with all sorts of functions in the standard library that simplify stuff like connecting to a database, reading form input, and so on. Still, one can get into the guts of things a little bit, so you don't feel like you're being hedged into doing things a certain way.

But that's not good enough for me.

Like, I suspect, a lot of other Perl Hackers, I like to have an insane amount of control over my apps. I like to be able to have my web applications interact seamlessly with any other utility I've written, and to use the same libraries. PHP sucks for pretty much anything but web-application stuff, so part of the reason all my own web stuff is written in Perl is that I can have it do what I want without trying to fit the square peg of PHP into the round hole of sysadminning or whatever.

As far as a strict comparison of CGI.pm (and other perl CGI tools) to PHP, I would have to say they are comparable. If you are comfortable with Perl, you'll prefer it to PHP. If you know a bit of Perl, but aren't fluent, you might prefer PHP. PHP was designed for the web, and it does its job pretty well.

LAI

__END__

In reply to Re: CGI/Perl vs PHP by LAI
in thread CGI/Perl vs PHP by gilbert0

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.