"Dozens of new language-specific communities have now entered the fray and brought along their legions of devotees with them, and many of those devotees see PHP as being passé. I even had the following happen to me, and this is absolutely a true story and can be verified by our VP of Operations, Richard Kotulski: I was in an elevator with O’Reilly’s very good “PHP Cookbook” in hand and an older gentleman scoffed at me and said, “PHP? What is this, 1920?” This really, actually happened. I doubt it would’ve have happened if I had had a Python or Ruby book in my hand."
Which... is even odder because some evangelists like to point out that python and ruby are older than PHP, as if that means much.
While I generally agree with the points, many PHP strengths are also weaknesses. For example - "Direct HTML embedding." It's nice and easy, but because it's so easy, it leads to unescaped output, and xss exploits and such.
PHP does let you as productive as you want to be on the web, either with raw PHP or with one of the myriad frameworks. The author's point that no other language gives you that is, I think, another one of PHP's strengths (but yes, is essentially a weakness in the wrong hands as well).
EDIT - have been using PHP since early 1996 - almost since its inception, and have watched the criticism (and occasional hate) ebb and flow over the years. That seems to be the only constant to PHP. :)
PHP is a Web scripting language (which I consider to be very different from a general-purpose programming language or even a scripting language), designed and developed to generate markup.
I have seen a lot of "templating" libraries (Smarty among them) and all they do is mimic the basic syntax of PHP using something else that is not PHP.
I know the theory ("designers don't know how or want to program"), but learning PHP conditional statements or loops is as difficult or simple as any "templating" library that asks you to learn its exotic syntax.
Now, MVC is good and one should avoid blending presentation code with models and controllers, but most MVC frameworks fail when they require you to instantiate a gazillion extra objects, just to render a Web page.
1. The gentleman's comment was indeed quite curious, and I wish that I could have used this info as a comeback. Thanks!
2. Direct HTML embedding could be seen as a weakness, yes, but that all depends on the kind of project. That's why I describe it as a good language for beginners and don't make any claims for or against it beyond that (beyond its demonstrated scalability, which I can only imagine being quite difficult in light of the security and other concerns that you voice).
Which... is even odder because some evangelists like to point out that python and ruby are older than PHP, as if that means much.
While I generally agree with the points, many PHP strengths are also weaknesses. For example - "Direct HTML embedding." It's nice and easy, but because it's so easy, it leads to unescaped output, and xss exploits and such.
PHP does let you as productive as you want to be on the web, either with raw PHP or with one of the myriad frameworks. The author's point that no other language gives you that is, I think, another one of PHP's strengths (but yes, is essentially a weakness in the wrong hands as well).
EDIT - have been using PHP since early 1996 - almost since its inception, and have watched the criticism (and occasional hate) ebb and flow over the years. That seems to be the only constant to PHP. :)