4 ms·
This is exactly right. There's a lot of use cases where what's needed are variables, loops, conditional logic, and easy HTML output. In those cases, the winning
by gabrielroth 17y ago
This is exactly right. There's a lot of use cases where what's needed are variables, loops, conditional logic, and easy HTML output. In those cases, the winning language is the one that's easiest to learn and to deploy. Problems with handling invalid characters in octal are just not relevant in those cases.
Of course, those cases aren't interesting to HN, but they're common, and PHP legitimately wins in them.
What should die is not PHP but the use of PHP in circumstances where another language would be a better choice.
- jacquesm 17y agoThat is a very good way of sketching it, but even the last part is sometimes not the easiest to do. I've written a 'media-player-annex-file-sharing-service' ( http://mxchg.com/ http://mxchg.com/ ), the thing has a web based front-end written in PHP and a C based back end for audio fingerprinting (so you don't end up storing 10 copies of each possible audio file). When the time rolled around to write the scripts that glue everything together in the back-end I chose to do it in PHP instead of python for several reasons: - it reduced the number of dependencies - it removed the need to rewrite part of the code in yet another language (mostly library stuff) - it removed the need for yet another skill in people wishing to modify it