Live data from Hacker News

Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

phoronix.com

11–20 of 144 posts

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#11
post #3

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

It's not a terrible experience, but it is truly baffling that anyone would start a project in it today. A good static type system is too useful and important.

[deleted]

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#12

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

It's fine. I still write a decent amount of PHP. I also maintain a Wordpress-backed CMS that processes payments and it works just fine to the tune of several million dollars per year, a figure that most people on HN start planning for concurrency, scaling, and doing tons of premature optimizations before hitting.

I helped on the HyperPHP documentation team and debugged a bunch as I wrote some machine learning stuff in PHP as an exercise in developing it with the HyperPHP translator.

I enjoy writing it. I find myself using Python more and more simply because it's easier to find better outsourcers with academic projects in their background (a niche I'm in and something that Python was literally built to service), but PHP 7+ has been great. I don't particularly care for the unbridled hate that comes with PHP historically being "bad" and also extremely popular.

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#13
post #4

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

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.

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

#14
post #3

Earlier quoted context omitted.

It's not a terrible experience, but it is truly baffling that anyone would start a project in it today. A good static type system is too useful and important.

> A good static type system is too useful and important. What? A whole lot of web apps these days are built in Python, Ruby, or JavaScript, none of which are statically typed languages. Do you mean a strong type system?

I assume mean strongly typed and I can agree with them to an extent. While it does add slight overhead when writing code (not enough to matter I think) it does help eliminate a bunch of errors/edge cases you'd have to unit test for in an dynamically typed language.

Though as I always say: use the right tool for the job. And for a lot of jobs dynamically typed languages and framework offer a lot to the developer.

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#15
post #4

Earlier quoted context omitted.

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.

There's one thing none of those have that PHP has: Work with off-the-shelf managed hosting.

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

#16
post #4

Earlier quoted context omitted.

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.

>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.

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

#17

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

Its good. We use silex/twig for development. Sites/ form processing is pretty straight forward and easy and I like the "microframework" idea of not being too opinionated.

Symfony and Zend have a large library with various functionality and you can pick and choose what you like. The php Composer lets you control dependencies easily.

The main problem is that there are almost too many frameworks and the language has a bad reputation (legacy warts from old generations). I maintain java and perl websites too, and find the php ones easier to maintain.

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#18

Honest, sincere, question here: How is programming in PHP these days? I haven't used the language since 4.x-5.2 or so. I wrote it off completely when Hack and HHVM came out due to the nuances between it and PHP proper (not to say either is bad, it was just another barrier, and set of choices I didn't care to deal with). I typically write Ruby, Elixir, and some JVM based languages these days. Any new features or langu…

Pretty independent of recent improvements, but one thing I feel people are forgetting about PHP these days is that, when given to a good hosting provider, PHP is essentially "serverless" programming, but without the vendor lock-in stuff like AWS Lambda give you. (and without the hype)

Admittedly, even on a good host it won't scale as ridiculously well as a lambda function does, but I'd wager scling from 1 to 1 million req/s in an hour and then back again is a pretty marginal use of Lambda. All the other advantages boil down to not having to manage your own server. Just deploy the code, and that's it.

Well, PHP has had this for decades. And I believe that people should really consider this when choosing a language. I don't know of any other language that you can code a backend in without thinking about servers and daemons and keeping nginx up to date, without getting vendor locked-in to something like Lambda or Heroku.

This is also why I don't really see the point of Hack/HHVM for any new product: If you're going to install some random runtime on some server as well, there's probably more ergonomic languages you can choose.

Re: Benchmarks of PHP 7.2 Beta: PHP Is Still Getting Faster

#19
post #4

Earlier quoted context omitted.

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.

>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.

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

#20
post #19

Earlier quoted context omitted.

>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.

That sounds more like all you know how to use is a hammer, so everything is a nail.

Sometimes all you need is a hammer because it's actually a nail.
Post reply on HN