3 ms·
>There are almost always better tools for the job than PHP, like Django, Rails, Go's net/http, etc. depending on the kind of thing you're writing. Except for t
by icelancer 9y ago
>There are almost always better tools for the job than PHP, like Django, Rails, Go's net/http, etc. depending on the kind of thing you're writing.
Except for the time when you are 10 times more proficient in PHP but none of those languages. Then no, none of those languages are better for the job.
- deckiedan 9y agoIt depends. I'm way more proficient in Python than anything else, but I'll still reach for PHP fur a single page template / dynamic report, or awk for some jobs, bash for others, Perl if there's exactly the right CPAN lib, ditto ruby or node, c for some jobs... Some times a different language can so utterly change/simplify your approach to a problem it's 100% worth it.
- deevus 9y agoThat sounds more like all you know how to use is a hammer, so everything is a nail.
- reefoctopus 9y agoSometimes all you need is a hammer because it's actually a nail.
- jjeaff 9y agoMore like, all you need is a Swiss army knife, and there are dozens of different Swiss army knives that can all get the job done. So use the one you are most familiar with.
- icelancer 9y agoPHP can do probably 95%+ of all functions of the languages you listed. The analogy doesn't quite hold.
- jchw 9y agoIf you don't do very much stuff, then sure. But most people end up coding long enough that learning new things is well worth the time. It's not like it takes more than a few months to learn a new framework or language, and you get benefits beyond just the new tools. Visual Basic is still a language that many people know better than other languages, but I'd not advise those people to stay on VB just because they know VB. And PHP is getting a fresh coat of paint but that doesn't mean it isn't antiquated - what other web based programming environments provide a CGI model where scripts are in the public directory? How many of them are HTML with directions for the actual programming language? If PHP is intended to stand on its own as a web development language, they've missed a few bits of low hanging fruit already. Like, take HTML out of the language. Package PHP with Composer. Allow for a new app base model where apps have their own FCGI servers and routing is done in PHP. I mean why not? These are things that modern users of PHP already try to accomplish, sometimes with [ugly hacks that are prone to security issues](https://www.acunetix.com/vulnerabilities/web/nginx-php-code-execution-via-fastcgi https://www.acunetix.com/vulnerabilities/web/nginx-php-code-...). I don't care if people think I'm just being a hater for the sake of it. I really think PHP is a dead end, and I think that because it seems the focus for PHP development has been toward making older software like MediaWiki run better rather than make PHP a better platform overall. As far as scripting languages go, it has a history of confusing, non orthogonal behaviors, legacy cruft, bad documentation, and designs that promote or directly cause security problems. And it has such a problem with memory management that the gold standard is to simply kill the PHP instance every N requests.