PHP has almost the verbosity of Java. For the same amount of effort you get less performance and access to inferior tooling for debugging, profiling, testing, static analysis, etc.
The average person working on PHP applications cannot write a multithreaded socket server and do not understand TCP. They don't know how things work and what to do when they don't.
Their mental model is based on self-evident truths such as "Laravel is good because Laravel is good" and "PHP is good because PHP is good", but as soon as you ask why, they cannot really ellaborate in terms other than "because it's good". It's a cargo cult.
You realize you are stereotyping a large group of people. You also know absolutely zero about modern day PHP, it seems. Let's argue about Perl 4.19 while we're at it.
I assure you the actual writers of Laravel know why Laravel (or Lumen) is good and why they made decisions they made. I promise you the Facebook PHP engineers who worked on HHVM and Hack know best practices and PHP really well (and know how to write a multithreaded socket server and understand TCP).
I also promise you that there are engineers that work all over the place (like non pure tech companies like banks and insurance companies) that don't look at Java as craft. They use Spring cause it's "good" and have written the DAO pattern 100s of times cause it "works". I bet the vast vast vast vast majority of Java Spring developers have not read Rod Johnson's Expert One-on-One J2EE Design and Development and actually understand WHY Spring was invented.
Knowing Java doesn't create some magical space where you suddenly know the TCP protocol state diagram. That's just a silly statement. I promise ANY average developer of ANY language can NOT spit out a bare metal implementation of TCP. Hell, I bet the average Java developer doesn't know the difference between UDP and TCP (or the average php developer, average python developer, average ruby developer, you get what I'm saying)
PHP is a language. One that is as performant as it's peers, has a large presence on the internet, and is battle-tested. If you instinctively shit on PHP developers, that's something you need to work on.
And, just to be clear, I don't CODE IN PHP and never have. I just know people who are brilliant who do and also deal with some PHP buried in my company to this day (like pretty much every tech company).
> I promise you the Facebook PHP engineers who worked on HHVM and Hack know best practices and PHP really well.
I said "the average person working on PHP applications", that clearly does not fit the description of HHVM engineers at Facebook, people that certainly know what they're doing.
If PHP users are so great, let's take a quick look at what kind of discussions are they having in 2020:
Again, you listed a ton of compiled languages compared to an interpreted language. Want to throw X86 Assembler in there too? Should we write all software in Intel syntax x86 Assembler? It's faster than Rust - just manage the registers yourself!
Fact is, interpreted languages have THEIR advantages in lots of areas.
Nice random zend link. I literally took 100ms and found questions on Stack Overflow about writing async PHP code from 2013.
Python LITERALLY just added the async/await keywords and co-routines in 3.5 in 2015 (AFTER PHP did). I can also link to "Why you should use Async in Python articles" from 2020 and 2019. Hell, google that phrase and see what comes up. Look at the talk tracks at PyCon last year.
I can also link to an article on how to do asynchronous programming in C# on MICROSOFT.COM from May 20, 2020 (you know, a pretty authoritative community place for .net) But it's a stupid point. There are tutorials to learn how to do things in every language written every day.
I get it, you're a language snob. This conversation feels like "Man, fuck people who speak German. They don't know how to build cars the way people who speak Japanese do."
Languages are languages. You can write shitty things in any language and good things in any language.
The facts are, nearly all of the big sites on the Internet have PHP somewhere, some PHP is bad and some is good, and there is a wide variance of skill level among PHP developers.
Replace that previous paragraph with any language and the answer is the same.
ReactPHP and similar solutions have existed for a while, but after many years of existence, how many people are using it? Not many.
Was async I/O promoted to a core language feature? It hasn't. You can do it, but you have to install a 3rd party dependency, and you will have to still interoperate with code that does not use async I/O. Contrast that to the reality in other languages.
Then, the rest of your arguments are not new, and are the usual last-resort losing arguments:
- "write everything in assembler if you care about performance": zero/low cost abstraction are different than no abstractions at all. Different in terms of productivity, maintainability, portability, etc. And you know this, I wonder why you mention it.
- "everything is relative and the choice of language doesn't really matter because they're all the same": they are not the same and the choice does matter. Languages are the product of different design and implementation processes, as well as different levels of investment, and results can differ a lot.
- Ad-hominem: I don't care. To me, your ad-hominem is the same as admitting your argument is inferior.
Anyways, PHP jumped the shark long ago and today it's just another legacy code language.
The average person working on PHP applications cannot write a multithreaded socket server and do not understand TCP. They don't know how things work and what to do when they don't.
Their mental model is based on self-evident truths such as "Laravel is good because Laravel is good" and "PHP is good because PHP is good", but as soon as you ask why, they cannot really ellaborate in terms other than "because it's good". It's a cargo cult.