"why would I use PHP for anything more than toy projects?"<p>Clearly PHP can, and is, being used for projects that go well beyond being toy projects. I doubt, for example, that anyone would call Flickr, Facebook, etc. 'toy projects.'<p>"But at my current job, I’m in charge of adding features and debugging a massive functionally-written PHP codebase. It is horrifying."<p>Ah...there it is. His real complaint is about maintaining bad code and not about a bad programming language. I would argue (and even wager) that equally difficult-to-maintain code could be written in Java, Prolog, C++, Lisp, Forth, and Logo (well, maybe not Logo).<p>I've written commercial applications in perhaps a dozen programming languages (including Prolog) and I've had love affairs with them all and yet I'm using PHP for my current project. But then again, I'm writing some great code and I love maintaining it! :-)
This article includes the same false assumption of just about every other article on PHP:<p><pre><code> PHP is Easy
</code></pre>
I'm not sure how anyone can claim that a language which only exposes the underlying C API of all the included libraries could be considered <i>easy</i>. Does no one stop to think that the reason 99% of PHP code is bad is because the language is actually <i>hard</i>? It's the C of scripting languages; it doesn't include a lot of fancy constructs or high-level abstractions. And, like C, that's what makes it powerful.<p>I think confusion exists because PHP is extremely <i>accessible</i>. It's intimately connected with the web environment (more so, and less securely, in the past) making it <i>quick</i> to get started. But that has never made it easy.
"Did PHP really win?"<p>Yes, for now. It is probably the most widely used language for web apps right now.<p>Anyone who calls PHP a toy language is not skilled enough to write anything better than a toy in PHP. It is not really a criticism, just an observation. Until you become skilled enough in any language you are pretty much doing fancy versions of Hello World. With many languages the skill of the programmer matters more. For example, I am still struggling to understand why I would ever use functional language for anything but that is a) because I haven't needed it yet and b) I haven't taken the time to acquire the knowledge and skill needed to write anything more functional than toys.
Perl: the language of "geniuses and academics"... Was it ever actually perceived as such? Or was the author simply intimidated by other, more academic languages as well? I'm pretty sure Perl doesn't do tail-call optimization like the article implies.<p>My impression of Perl was always as a practical, "get-'er-done" language, much like PHP -- and prone to the same legibility/maintainability problems if care was not taken.
I really do not understand people reacting violently on how "PHP sucks/horrifying". PHP is just a tool that people use. Blame the programmer not the tool. I have had encounters with horrifying code with a lot of times BUT most of my complaints were on bad design and how programmers badly handled their code.<p>"Being mindful of best practices in software development fundamentals can be more effective than adopting every latest technology." - Bill Karwin
this is accurate. this is how i felt. php was a statement, and asp and coldfusion at the time perhaps were right there, too, but each had their tie-ins and paradigms, and php seemed to be positioned in opposition to that. and i agree anymore it would be best if it is in java or python or something if at all possible, way more maintainable.
I'd submit that PHP is for this generation of programmers what BASIC was to a lot of the older generation (including me).<p>I started on BASIC on a Trash-80. Actually you can probably substitute some of the terms in this blog post for my journey from BASIC to now.
If you want easy, quick and accessible all rolled into one, try WebDNA. Nah, on the other hand I think you 'real' programmers would not be interested in using such a simple tool.