PHP is dead.
blargh.tommymontgomery.com
blargh.tommymontgomery.com
PHP, like most things, has a lifecycle. If we know anything about scripting languages, they're incredibly resilient. PERL, for instance -- a language nearly 25 years old -- seems to be updated with less frequency than PHP, but continues to be used and developed. Not just to maintain legacy infrastructure, but to build new products.
Even if we're witnessing the sunset of PHP's development -- which I doubt is the case -- it'll be a very long time before it dies.
> PERL, for instance -- a language nearly 25 years old --
> seems to be updated with less frequency than PHP,
While there was a discernible lull in the mid-2000s, development of Perl 5 is in surprisingly good shape right now. Also, it's not an acronym.If you want classes, namespaces, anonymous functions, etc. use a different fucking language. Don't bitch when the feature you want is a shoehorned in piece of crap.
Stop polluting an otherwise useful language.
The reason why most PHP devs don't go off on massive Java-like inheritance sprees is PHP's execution model. It's strictly request-based. For every request, PHP code creates an environment to service it, and then everything gets discarded. This is one of the strengths of PHP, actually, it makes PHP apps stateless in many respects. However, this also means that it is unwise to build computationally wasteful structures like extensive OO schemes - at least for performance-conscious production environments. Contrast this to Java or ASP.NET apps, for example, where the cost of initializing massive OO frameworks is offset by the fact that they stay intact across requests.
So I believe OO features are very good and important for PHP, as long as developers keep the computational cost in mind. Also, closures are awesome.
"You don't hammer in nails with the handle of a screwdriver." was something my Dad used to say and I thought it was pretty stupid, until I thought of it as a metaphor for all the times my 'pain' was that I had the wrong tool in my hand and was too blind to see that.
People are trying to PHP in ways it can't easily go, and yet that is the requirement the user's have, thus PHP is by definition the wrong tool. Tools which do not serve a purpose as well as other tools don't get used. A language, system, or tool which nobody uses is 'dead'. QED.
"People are trying to [take] PHP in ways it can't easily go ..."
Tools make hard jobs doable, the right tool for the job can make a difficult job trivially easy. The definition of the 'right' tool can then be expressed as 'doesn't cause you pain' and the inverse works as well, if your tool is causing you pain then it is not the right tool for what you're trying to accomplish.
Probably an example of tm;du (too meta; didn't understand) :-)
Ok, no, no that's not fair, but it'd be nice to see people move over to other languages, if only because many of them strongly encourage the use of web frameworks which inspire (or force) better coding practices.
It'll be refreshing to see that my data isn't being compromised by every website I visit because their PHP/MySQLi code is vulnerable to SQL injection...
The true lesson is: Don't assume user's input is ok for SQL queries. All input is evil!
Passenger configuration is done through your Apache vhost configs. You tell Passenger how many app server processes to spawn, restart Apache, and you're done. Passenger even plays nice with user-specific deployment strategies, meaning your Ruby apps will automatically run as the user who owns the Ruby app files. I'm not even sure mod_php does that. Passenger architecture includes process monitoring that keeps track of your Ruby processes, so you no longer have to implement "watcher" apps like Monit of God.