News for hackers. Stuff that matters.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by jchw on Saturday July 29, 2017 @11:42PM (#14884334)
PHP7 has improved life when dealing with legacy systems, but I think all in all you're better off not building new stuff in it. 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.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by icelancer on Saturday July 29, 2017 @11:59PM (#14884391)
>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.

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by deckiedan on Sunday July 30, 2017 @12:27AM (#14884442)
It 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.

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by jchw on Sunday July 30, 2017 @02:25AM (#14884665)
If 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-...).

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.

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by deevus on Sunday July 30, 2017 @12:53AM (#14884493)
That sounds more like all you know how to use is a hammer, so everything is a nail.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by jjeaff on Sunday July 30, 2017 @01:26AM (#14884553)
More 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.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by reefoctopus on Sunday July 30, 2017 @01:01AM (#14884509)
Sometimes all you need is a hammer because it's actually a nail.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by icelancer on Tuesday August 01, 2017 @02:02AM (#14898249)
PHP can do probably 95%+ of all functions of the languages you listed. The analogy doesn't quite hold.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by greenhouse_gas on Sunday July 30, 2017 @12:06AM (#14884409)
There's one thing none of those have that PHP has:

Work with off-the-shelf managed hosting.

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by jjirsa on Sunday July 30, 2017 @12:27AM (#14884441)
This is something programmers will never appreciate, and every small business on earth has already encountered

Go build your client's new website in go, and then spend 80 hours trying to make it work with their $5/month hosting

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by greenhouse_gas on Sunday July 30, 2017 @02:27AM (#14884672)
You can get it to work with a $5 a month VPS. The issue is more that a VPS requires constant maintenance.

Let's say my friend runs a store. He needs a website. I can:

1. Find a $5 a month shared hiding plan. As it's Shared, they don't let you start servers, so go (as well as python) is out of the picture (unless you run it as a CGI - yuck). You develops the site, sell it to him, and fix on contract. You never have to do another thing for him.

2. Get a $5 a month VPS, spend another $1 a month (or more) on an S3 backup. Ensure said backup works (try it out once in a while). Keep OS up to date.

Which is easier? Which is more maintainable?

Does anyone think that if WordPress was written in Python it would get nearly as much traction?

That's why PHP won the internet (and that VPSs were extremely expensive until a about a decade ago) - servlets where around for a long time but you couldn't run it on a shared server - made it dead on arrival.

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by jjeaff on Sunday July 30, 2017 @01:28AM (#14884556)
And then after you move on, be cursed for all eternity when they have to find and hire someone with go experience to fix that tiny bug. Costing them 3x as much as if it was just PHP where anyone and their brother can work on it.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by cutler on Sunday July 30, 2017 @09:00AM (#14885758)
Just switch them to a $5/mth Linodode VM and push your one-off prepared Docker image. They're now getting 1GB RAM for their money so no complaints.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by jjirsa on Sunday July 30, 2017 @11:04AM (#14886231)
This is exactly the type of response I expect from people who have never done this in real life, because real small businesses don't know what to do with that linode VM, don't know what docker is, and will end up undoing it all the day they need to make a 2 line text change and their neighbor who makes those changes for them in notepad can't do it anymore
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by bdcravens on Saturday July 29, 2017 @11:56PM (#14884379)
I haven't built anything in it (and rarely touch PHP, aside from some Wordpress ecosystem stuff), but if I were to build a web app in PHP today, I'd build it in Laravel vis-a-vis "raw" PHP.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by memco on Sunday July 30, 2017 @03:08AM (#14884804)
In addition to PHP itself undergoing a lot of good optimizations a lot of tooling and frameworks have come a long way as well. Composer and most modern frameworks play much nicer in the ecosystem and it is quick and easy to get something up and running which gives access to most of the things you'd need in a webapp. I'm a big fan of Laravel personally but there's plenty of other great options nowadays.
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by Can_Not on Sunday July 30, 2017 @10:49AM (#14886173)
Why would you use Django, Rails, Go's net/http, etc. when there's almost always better tools for the job like laravel, symfony, silex, rust, etc?
Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by stephenr on Saturday July 29, 2017 @11:47PM (#14884354)
So, framework-vs-language arguments without any kind of explanation why are in huh?

Ok, I can dig it.

Instead of wearing sneakers you should wear cloggs or flip flops.

Re:Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster by jchw on Sunday July 30, 2017 @02:36AM (#14884704)
If you want more detail on my position, I wrote more here: https://news.ycombinator.com/item?id=14884665