Live data from Hacker News

The Future of PHP

medium.com

21–30 of 66 posts

Re: The Future of PHP

#21
post #16

Earlier quoted context omitted.

>The only people who think PHP is dying is those who don’t use it. That is absolutely not true. I didn't care about PHP at all when I didn't use it. Then I got a job where I had to use it (and the management didn't want to hear about changing it), and I started slowly disliking it. Then I got out of that job and again mostly forgot about it and curretly don't really care what happens to it. Weird defences like yours…

So, given you "don't care what happens to PHP", I assume you don't give much heed to whether it's winning or dying. That's basically what @deanclatworthy is saying, so there is nothing to fight about. Cheers!

I'm not fighting, I just gave a single data point that invalidated (logically, not actually) one part of his argument (the one I quoted) :) And then a bit of commentary.

Re: The Future of PHP

#23
post #15

Earlier quoted context omitted.

Like what features?

types? interfaces?

Types, sure. PHP 7 does those better than python, mainly due to the fact that the main implementation actually checks the types. Python seems to rely on 3rd party tools for that for some reason. Dunno if they're gonna change that or if they designed it like that.

Interfaces, hmm. PHP took its whole OO almost directly from Java, which is an odd thing to do given how different the typing disciplines of Java and PHP are. Python's OO system is much more in-tune with the dynamic aspect of the language.

Re: The Future of PHP

#24
I've been really impressed by the performance improvements made during the last couple of years. I guess my main issues with the language is the non-uniform naming of functions and the ordering of their parameters.

At some point, I'd like to see a new major release that deprecates all of those old problems in order to clean stuff up. Even if it means breaking backwards compatibility a year or two later on.

It turns out, however, that such things aren't easy to handle. Python 2 to 3, anyone?

Re: The Future of PHP

#26
post #15

Earlier quoted context omitted.

Like what features?

types? interfaces?

yet if you want to start using python for large projects you have to come up with some hacks to make sure certain things are in check. With python is as easy as php to create spaghetti code and the language itself doesn't even help with that, however php is the only one taking the blame

Re: The Future of PHP

#27
As far as prominent products, besides WordPress, Facebook, and Wikipedia, Slack and Mailchimp are (were?) also PHP. (I googled and apparently a prominent '-hub' site uses it too.)

The PHP hate never made sense to me in the context of the rise of Node.js:

* In PHP I've never accidentally combined 2 + 0.3 into 20.3

* I dislike the cowboy-ish over-use of ternary operators and short-circuiting by JS devs (random example from StackOverflow: var bar = data.bar !== undefined ? data.bar : 'default'; )

I appreciate that JS has functional-programming aspects that make it appealing though.

It's interesting that when PHP alternatives like Rails came around I saw a lot of anti-Java sentiment online, but now when Rails-based companies have to scale they end up using Java or JVM-based infrastructure. So trendy online sentiment shouldn't really inform best practices for various teams at various stages. (I notice that a lot of NoSQL hype seems to have died down since 2015...)

Perhaps the best commentary about why people succeed with PHP is this HN comment from a couple years ago: https://news.ycombinator.com/item?id=12704094

If you're programming in PHP, you're not running around talking about "convention over configuration" giving talks, or trying to make your code beautiful... You're incorporating feedback while the other guy is just starting to get to work. When he finally fails, he's used up half his runway, whereas you, the guy who didn't give a fuck about your code has gotten past that first failure, and are finally getting some traction.

Re: The Future of PHP

#28
post #27

As far as prominent products, besides WordPress, Facebook, and Wikipedia, Slack and Mailchimp are (were?) also PHP. (I googled and apparently a prominent '-hub' site uses it too.) The PHP hate never made sense to me in the context of the rise of Node.js: * In PHP I've never accidentally combined 2 + 0.3 into 20.3 * I dislike the cowboy-ish over-use of ternary operators and short-circuiting by JS devs (random example…

as my friends will attest, I'm not the largest fan of PHP.

But it's not the language it was, it's much better these days; and it was always very fast for an interpreted language.

I really cannot agree with you more that for all the hate PHP gets, javascript is a thousand times worse. I figure the major difference is the ecosystem surrounding javascript. The tools are super great and writing multi-threaded/async code is very easy.

But I say this as a person who avoids both PHP and Javascript, so I might be talking nonsense.

Re: The Future of PHP

#29
post #9

According to this interesting Google Trends chart https://trends.google.com/trends/explore?date=all&q=python,p... Python is on a quite strong climb, with PHP falling significantly over the years. But, it also says Javascript is on the same trajectory so that shows the real value of the data.

There are many fresh graduates coming out of uni thinking Python is the next big thing. But once they realise companies don't want to invest in re-inventing the wheel, they will one way or another have to learn some PHP.

Re: The Future of PHP

#30
post #27

As far as prominent products, besides WordPress, Facebook, and Wikipedia, Slack and Mailchimp are (were?) also PHP. (I googled and apparently a prominent '-hub' site uses it too.) The PHP hate never made sense to me in the context of the rise of Node.js: * In PHP I've never accidentally combined 2 + 0.3 into 20.3 * I dislike the cowboy-ish over-use of ternary operators and short-circuiting by JS devs (random example…

I have being using PHP since it was call PHP - Personal Home Page. The best part of the PHP is the templating! It makes a lot more sense then Perl at the time. Now days templating can easily be replaced by EJS.

Personally I wouldn't want to use any language that does not have closure and function as a first class citizen. It makes programming fun and productive.

BTW, the 2 + 0.3 thing you are mentioning are all fixed by ES15 and ES6.

Post reply on HN