A lot of people here are being much more polite than I am on this subject, so I'm jumping in -- but a lot of the people here know more about PHP than I do, so take me with several grains of your favorite sodium compound.

PHP has always struck me as a horrible language -- it's primary technical advantage is a smaller memory footprint than perl, but it gets that smaller footprint by not doing some very basic things, i.e. until very recently PHP has had no actual namespaces, which means no way to separate the behavior of components, which means mysterious bugs popping up as upgrades to component X and Y cause action-at-a-distance with component Z.

Yes, I know you can fake namespaces with naming conventions, but there are limits to how well that works (trust me on that one: I do some emacs lisp programming, I know what life is like without real component separation).

Further, I do have experience with using large projects written in PHP, and I've seen a definite pattern of "Let's use this, it's easy to setup", followed by constant buggy behavior that no one can seem to fix. It may be easy to get them setup, but it appears to be very hard to get them setup right.

Now, obviously there are places like Yahoo that live-and-die by PHP, and for them it seems to work... so it would seem that coding conventions, automated tests, and a large, aggressive QA department can make up for many gaps in a language... but before embracing something like PHP, I think you need to ask yourself if you have the resources of a Yahoo at your disposal.

All of this said: the big differences between languages are never really "technical" ones, but rather social ones (I don't think it's an accident that Python attracted the world's most annoying advocates...). PHP is a relatively young language that came in with the web 1.0 bubble, and had very little room to breath before it saw heavy use. Perl has it's roots in Unix sysadmins and system programmers -- it was a pretty strange animal by the standards of the Computer Science Department people, but it's original core community was much more experienced than PHP's... and perl had the advantage of a longer period of adoption, so there was room for at least one major revision before the it got slammed by the web craze. (You might think of PHP as perl with the perl4-era design errors locked-in).


In reply to Re: From PHP to Perl - Should I, and how? by doom
in thread From PHP to Perl - Should I, and how? by salazar

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.