Is PHP going to die?

  • (11 Pages)
  • +
  • « First
  • 9
  • 10
  • 11

156 Replies - 14036 Views - Last Post: 08 May 2018 - 02:54 PM

#151 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11458
  • View blog
  • Posts: 19,523
  • Joined: 19-March 11

Re: Is PHP going to die?

Posted 07 May 2018 - 09:18 PM

Quote

No, Jon, PHP was not designed to defeat users


Oh, but it was.
Was This Post Helpful? 0
  • +
  • -

#152 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12557
  • View blog
  • Posts: 45,683
  • Joined: 27-December 08

Re: Is PHP going to die?

Posted 07 May 2018 - 09:32 PM

View Postjon.kiparsky, on 08 May 2018 - 12:18 AM, said:

Quote

No, Jon, PHP was not designed to defeat users


Oh, but it was.


This should be the theme for the next of DIC Signature of the Month. :P
Was This Post Helpful? 0
  • +
  • -

#153 xclite   User is offline

  • I wrote you an code
  • member icon


Reputation: 1364
  • View blog
  • Posts: 4,187
  • Joined: 12-May 09

Re: Is PHP going to die?

Posted 08 May 2018 - 04:58 AM

View PostArtificialSoldier, on 07 May 2018 - 02:33 PM, said:

Quote

Further, they run a version of PHP that they created specifically to mitigate how bad a language it is.

If you're referring to HHVM, I'd like you to cite that claim.

Nope. Have you not heard of Hack, which introduces useful typing constructs? Sure it runs on HHVM, but Hack is for mitigating rough edges in PHP, not for improving performance.

I don't actually have complaints about PHP performance... it's certainly quite adequate and light-footprint for any area you see PHP used in, IMO.

Quote

Quote

We've been on this road before, and you all had to concede that operating in an ecosystem entails working on old versions of the tools, so whether it's good now or not does not mitigate the bad that you have to contend with.

This is completely subjective. For example, I control the PHP environment here.

Excellent! Is that true for junior hires? Somebody who learned this language and is now entering the world of programming? Does everybody have this control? It's not possible to ignore the ecosystem just because you control it at your job.

Quote

But don't take my word for it, here's Wordpress:

Quote

Note: If you are in a legacy environment where you only have older PHP or MySQL versions, WordPress also works with PHP 5.2.4+ and MySQL 5.0+, but these versions have reached official End Of Life and as such may expose your site to security vulnerabilities.


This is a non-sequitur - Wordpress telling people to upgrade doesn't mean they have or do. I mean this is a good thing for them to say, of course. In any case,

Quote

There you go, if you're using an ancient version of PHP like 5.2.4, Wordpress will still work, although it's going to run slower and your host sucks. For everyone else:

Quote

To run WordPress we recommend your host supports:
PHP version 7.2 or greater.
MySQL version 5.6 or greater OR MariaDB version 10.0 or greater.
HTTPS support

So, if you're up to date, great. If your host hasn't upgraded since Jon Kiparsky last looked at PHP, it will still run but that's as far back as they're willing to go. I don't know what it is about 5.2.4 or earlier versions which makes that their cutoff, but it's not like you're going to find PHP 4 servers or older versions of PHP 5. There's literally no reason for anyone to use those. There's no excuse for using them other than a complete inability to configure a web server, in which case you should not be the one configuring the web server.

Bold mine, but THAT'S EXACTLY THE CROWD PHP ATTRACTS (among others, of course). So yes, it actually is a problem that old versions of PHP suck, because one of PHP's strengths is its ease of use and low installation effort, which is going to mean that projects written in it are often set up and operated in a hands-off fashion. Or really, a problem for any ecosystem, it's just more severe when the old one is that bad.

Quote

Quote

PHP Storm is written in Java and is slow to load, debug, and quit in both Mac and PC versions, and keeping more than one project open at a time makes the slow down more noticeable.

That's funny, reading about the Java performance discussion, my first thought went to IDEs written in Java, and PHP Storm specifically. I actually have to use "scratch pads" in PHP Storm because it's too slow to respond if I edit some of the files directly. There will literally be seconds of waiting after I type something while it's trying to figure out how to color it. Sure, I could turn off all syntax highlighting, but that seems pretty stupid to need to do in an IDE. As a general rule, I try to avoid software that begins with a "j" or ends with a "beans".

I personally don't have these issues with IntelliJ itself. It's surprising to me that IntelliJ can actually recompile the Java code on the fly with no delays for me, but the PHP editing sounds like it's essentially unusable. I haven't tried other non-JVM languages like Ruby or Javascript; maybe they've got some issues to work out there.

Quote

Quote

Do you have any more convincing argument to make about Java's slowness?

I'll acknowledge that Java has become a lot faster over the last 15 years or so, but that doesn't change the fact that I open my IDE written in Java, open one of my source files (this is usually Javascript code), type "/*", and wait literally seconds for it to become responsive again while it figures out what color to make things. It doesn't change the fact that I will type out a line of code, sit there and wait 5 or 10 seconds until the characters appear in the IDE, check for typos, and move to the next line. Is Java faster than it was 15 years ago? Thankfully, yes. Does it still manage to completely fail? Uh huh. This is pretty damn far off-topic though.

This is off-topic, and also wasn't your battle, but yeah, it's a good thing that Java isn't only useful for IDEs because it being this hard to write something responsive in it would be an issue. Regarding the performance of Java in general, it basically isn't debatable, though. The JVM is a very performant platform, and this is born out again in again in synthetic benchmarks (which are typically useless) and real-world use cases.

Generally its blind spots are:

  • CLI tools
  • Number crunching
  • Apparently, desktop apps. Maybe there's a heap argument that needs tweaking or something. Anyway, a digression.

Like - what I'm always going to keep going back to here is this. Not that PHP is functionally useless, not that large products aren't built in PHP - but that it just doesn't give me enough for the baggage to keep using it, or to encourage anybody else to use it. I don't have to use a language whose type system subverts one's expectations. Where the answer to each wart is that you learn to work around it. This is the Javascript argument, which I don't buy either, but we have to use Javascript because nothing else (reliably) runs in browsers. I don't even need static typing! I just would like consistent typing (as an example).

There are simply better server-side languages that do more stuff. We can talk about how Java sucked before (and kind of after) generics, and how PHP's arrays are actually ordered maps (no matter how you spin it, this is ridiculous) - what am I getting from PHP that I cannot get anywhere else, that makes it worth whatever investment or pain, regardless of how large or not that investment is?

My response would be that I get affordable and efficient hosting. That's not nothing, it's just not good enough in today's compute landscape.

Edit: I guess put a different way. If all of Jon's complaints were invalid, and if PHP were just a boring (and I mean boring as a compliment here) language, would I use it for anything beyond a CRUD website today? Probably not.
Was This Post Helpful? 1
  • +
  • -

#154 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2247
  • View blog
  • Posts: 6,858
  • Joined: 15-January 14

Re: Is PHP going to die?

Posted 08 May 2018 - 12:47 PM

Quote

Have you not heard of Hack, which introduces useful typing constructs?

I was familiar with it in name only. I wouldn't say it "introduces" useful typing constructs in PHP, type hinting has been a feature since PHP 5 (again, that's 2004). It expands on type hinting, in PHP 5 you could specify a class/interface as a type or self as a type, then in 5.1 they added the ability to specify an array as a type, and a callable function in 5.4. PHP 7 adds support for the regular scalar types. It looks like that's similar to what Hack provides, and it has a strict mode to enforce typing everywhere it's supported and a more relaxed mode where typing is not required in places where it cannot be inferred.

It looks like Hack adds some features that can be considered useful, but I also want to point out that languages which are dynamically, weakly, or gradually typed are all accepted paradigms. These are not objective weaknesses of a language, regardless of how strong someone's personal opinion is on typing.

Quote

Excellent! Is that true for junior hires?

Do junior hires control the infrastructure on which we run the company? No they don't.

Quote

Somebody who learned this language and is now entering the world of programming?

Of course they can control their environment.

Quote

Does everybody have this control?

Everybody does have this control, yes. PHP is entirely open source. Multiple web servers are open source. Literally anyone with an internet connection can set up a server and any version of PHP they please, and they can do whatever they want to do with it. None of the employees here needs my permission to go home and set up a web server and develop a PHP application.

Quote

It's not possible to ignore the ecosystem just because you control it at your job.

I'm not ignoring anything. I'm pointing out that no one is bound and obligated to use any specific version of PHP.

And I don't know why we're singling out PHP for "version uncertainty" or whatever you want to call it. At any programming job you are working within the constraints of your employer if that's how you roll, or you work for yourself and set your own requirements based on each client. This is not unique to PHP in any way. I don't see why this should be used as a mark against only PHP.

Quote

This is a non-sequitur - Wordpress telling people to upgrade doesn't mean they have or do.

Ehh.. therefore PHP sucks? I'm not following.

Quote

Bold mine, but THAT'S EXACTLY THE CROWD PHP ATTRACTS (among others, of course).

Great - rent hosting. Find a PHP 7 host. There are loads out there. Don't launch into configuring web servers, fine, that's great. It's understandable. No one is requiring anyone to configure a web server. If your host can't upgrade your PHP version because they don't have anyone competent enough to run the server, then find a new host. Server administration is not a prerequisite to PHP programming.

Quote

Not that PHP is functionally useless, not that large products aren't built in PHP - but that it just doesn't give me enough for the baggage to keep using it, or to encourage anybody else to use it.

That's a reasonable position, I understand that. It's just a difference of opinion, I don't find PHP's set of baggage to be a fatal flaw.

Quote

There are simply better server-side languages that do more stuff.

That may be true, but again it's mostly subjective. If I'm going to switch to a different tool there needs to be a pretty compelling reason to make that change, and the importance of the reason needs to increase with the current investment in the tool. If I didn't already make the decision to become invested with PHP, then I wouldn't have a problem if someone here wanted to do a project with Python or Ruby or whatever. When they pitch that to me now, I need a reason why they can't do the same thing in PHP to approve that or else we're going to be running multiple environments for different projects and now my workload as the CTO goes up because I need to maintain these environments. If my workload is going to go up, there needs to be a good reason why we can't do this job in our existing environment. To date, this hasn't happened. I'm not saying it can't happen, maybe there's some quirk to being Turing-complete where some other language can actually do something that's not possible in PHP, but I haven't found it yet. Hell, there's even a way to write code for the .NET platform with PHP (likewise, since PHP 4.1 we've been able to run .NET assemblies in PHP also).

Quote

If all of Jon's complaints were invalid

They are tho. Exhibit A is at the top of this page. Hyperbole doesn't get people very far in a technical discussion.
Was This Post Helpful? 0
  • +
  • -

#155 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11458
  • View blog
  • Posts: 19,523
  • Joined: 19-March 11

Re: Is PHP going to die?

Posted 08 May 2018 - 01:48 PM

View PostArtificialSoldier, on 08 May 2018 - 02:47 PM, said:

They are tho. Exhibit A is at the top of this page. Hyperbole doesn't get people very far in a technical discussion.


Oh, that was just me giving up. You've had plenty of serious argument, here and elsewhere, and you keep ignoring it in favor of your own straw men. Why bother?
Was This Post Helpful? 0
  • +
  • -

#156 xclite   User is offline

  • I wrote you an code
  • member icon


Reputation: 1364
  • View blog
  • Posts: 4,187
  • Joined: 12-May 09

Re: Is PHP going to die?

Posted 08 May 2018 - 02:51 PM

View PostArtificialSoldier, on 08 May 2018 - 03:47 PM, said:

Quote

Have you not heard of Hack, which introduces useful typing constructs?

I was familiar with it in name only. I wouldn't say it "introduces" useful typing constructs in PHP, type hinting has been a feature since PHP 5 (again, that's 2004). It expands on type hinting, in PHP 5 you could specify a class/interface as a type or self as a type, then in 5.1 they added the ability to specify an array as a type, and a callable function in 5.4. PHP 7 adds support for the regular scalar types. It looks like that's similar to what Hack provides, and it has a strict mode to enforce typing everywhere it's supported and a more relaxed mode where typing is not required in places where it cannot be inferred.

It looks like Hack adds some features that can be considered useful, but I also want to point out that languages which are dynamically, weakly, or gradually typed are all accepted paradigms. These are not objective weaknesses of a language, regardless of how strong someone's personal opinion is on typing.

No, sorry. You don't get to hold facebook up as an example of a Serious Company doing Serious PHP when, to do Serious PHP, they fixed issues they saw with building a large system in that language. I'm not taking the position that you need gradual, static, or lint-style type checks to make a language "good", here.

Quote

Quote

Excellent! Is that true for junior hires?

Do junior hires control the infrastructure on which we run the company? No they don't.

Are you intentionally missing the point? The context here isn't that the junior makes poor choices. It's that they learned PHP and don't have the luxury of picking their environment.

Quote

Quote

Somebody who learned this language and is now entering the world of programming?

Of course they can control their environment.

Quote

Does everybody have this control?

Everybody does have this control, yes. PHP is entirely open source. Multiple web servers are open source. Literally anyone with an internet connection can set up a server and any version of PHP they please, and they can do whatever they want to do with it. None of the employees here needs my permission to go home and set up a web server and develop a PHP application.


This is just another case of survivorship bias, and at this point I'm just assuming that you have a narrow view of what it's like to be in the industry, which I'm having a hard time buying but I can't find any other reason you could think that everybody can always control the debt at the company they just got hired into.

Quote

Quote

It's not possible to ignore the ecosystem just because you control it at your job.

I'm not ignoring anything. I'm pointing out that no one is bound and obligated to use any specific version of PHP.

But you are obligated! Not YOU you, but how myopic do you have to be to miss the explicitly spelled out point that people in a variety of roles and a variety of experience levels end up in positions where they are working in the existing codebase and aren't going to be able to sell a version upgrade to the suits? Yes, the suits should buy it.

Quote

And I don't know why we're singling out PHP for "version uncertainty" or whatever you want to call it. At any programming job you are working within the constraints of your employer if that's how you roll, or you work for yourself and set your own requirements based on each client. This is not unique to PHP in any way. I don't see why this should be used as a mark against only PHP.

BECAUSE A LARGE PART OF YOUR ARGUMENT IS THAT PHP IS BETTER NOW. If it was worse in the past, then the existence of old versions will remain problematic. Other languages experience similar improvements over time, but weren't so egregious in decades past.

Quote

Quote

This is a non-sequitur - Wordpress telling people to upgrade doesn't mean they have or do.

Ehh.. therefore PHP sucks? I'm not following.

Trying real hard here. The point is that a vendor recommending upgrades is a positive but in no way a guarantee. Like, "no there are no old versions of PHP, look, Wordpress recommends this new version!" Do you see how that is in no way a compelling argument?

Oracle has terminated support for all Java versions < 10, I guess I can just assume that nobody is running Java 8. Can you see how that doesn't work?

Quote

Quote

Bold mine, but THAT'S EXACTLY THE CROWD PHP ATTRACTS (among others, of course).

Great - rent hosting. Find a PHP 7 host. There are loads out there. Don't launch into configuring web servers, fine, that's great. It's understandable. No one is requiring anyone to configure a web server. If your host can't upgrade your PHP version because they don't have anyone competent enough to run the server, then find a new host. Server administration is not a prerequisite to PHP programming.

Yes. Sorry, this point isn't important enough that I'm going to attempt to clarify beyond: Doing the right thing is hard when easy stares you in the face. To be clear, not maligning the value of easy, just that PHP is noob-friendly (a good thing!) and noobs don't always know when they're noobs, right?

Quote

Quote

Not that PHP is functionally useless, not that large products aren't built in PHP - but that it just doesn't give me enough for the baggage to keep using it, or to encourage anybody else to use it.

That's a reasonable position, I understand that. It's just a difference of opinion, I don't find PHP's set of baggage to be a fatal flaw.

And that's how we got node.js. I get it, I just think it's hilarious.

Quote

Quote

There are simply better server-side languages that do more stuff.

That may be true, but again it's mostly subjective. If I'm going to switch to a different tool there needs to be a pretty compelling reason to make that change, and the importance of the reason needs to increase with the current investment in the tool. If I didn't already make the decision to become invested with PHP, then I wouldn't have a problem if someone here wanted to do a project with Python or Ruby or whatever.


At a meta level, you don't think perhaps the discussion is actually kind of about this? About how the only reason to keep using PHP is that you already do?

Quote

When they pitch that to me now, I need a reason why they can't do the same thing in PHP to approve that or else we're going to be running multiple environments for different projects and now my workload as the CTO goes up because I need to maintain these environments. If my workload is going to go up, there needs to be a good reason why we can't do this job in our existing environment. To date, this hasn't happened. I'm not saying it can't happen, maybe there's some quirk to being Turing-complete where some other language can actually do something that's not possible in PHP, but I haven't found it yet. Hell, there's even a way to write code for the .NET platform with PHP (likewise, since PHP 4.1 we've been able to run .NET assemblies in PHP also).


Sure, I mean. If your job is rendering HTML and things roughly related, then uh. Fine? But let's not pretend this a flexible general purpose language (not your words, I know).

Quote

Quote

If all of Jon's complaints were invalid

They are tho. Exhibit A is at the top of this page. Hyperbole doesn't get people very far in a technical discussion.


Do you plan to answer the actual question, then? Like I'd be interested to know if PHP people think it's the right choice for not-CRUD. Running .NET in PHP or vice versa isn't what I'm getting at.

In the end, PHP sucking or not really doesn't affect me, which is awesome. The industry is still at a point where diversity in choice is probably valuable, but if somebody posts "Man, is investing in PHP a good idea", I think it's worth the critical voice, because it is a language of extreme compromise.
Was This Post Helpful? 0
  • +
  • -

#157 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2247
  • View blog
  • Posts: 6,858
  • Joined: 15-January 14

Re: Is PHP going to die?

Posted 08 May 2018 - 02:54 PM

I haven't ignored anything. I've called out hyperbole when I've seen it, which is often, I've called out 15 year old arguments which don't apply to current versions, and I've pointed out when something is a statement of opinion instead of an objective flaw. I'm getting the feeling that those things make up the crux of your argument, which explains why it would be abandoned.
Was This Post Helpful? 0
  • +
  • -

  • (11 Pages)
  • +
  • « First
  • 9
  • 10
  • 11