←back to thread

123 points jonfelsar | 8 comments | | HN request time: 0.289s | source | bottom
Show context
ksenzee ◴[] No.45188438[source]
This is a preemptive plea for people who last wrote PHP in 2012 not to opine on what writing PHP is like in 2025. It is not a hammer with two claws. It’s a modern language with types and tooling and package management.
replies(11): >>45188723 #>>45188743 #>>45188884 #>>45188975 #>>45189013 #>>45189047 #>>45189096 #>>45189217 #>>45189290 #>>45194060 #>>45197489 #
1. Calavar ◴[] No.45188743[source]
I've heard that a lot, but my gripe with modern PHP is what's the hook? What feature does it offer that other scripting languages don't?

- Can you use the same rendering logic on client and server like JavaScript?

- Does it have the performance of Java or C# or Go?

- Does it allow for expressive DSLs like Ruby?

- Does it have an extensive, cutting edge ML ecosystem like Python?

Back in 2010, PHP's stand out features were very straightforward installation, good support for templating, and a large collection of C library wrappers (even if the interfaces were a bit raw). Those hooks were compelling enough to make people put up with the PHP4 core language.

But other languages have caught up on those three points, which leaves modern PHP utterly unremarkable. It doesn't have any feature that stands out enough to make me want to switch back.

replies(4): >>45188867 #>>45188892 #>>45189073 #>>45189258 #
2. Zarkaos ◴[] No.45188867[source]
- Kinda with templates, but I don't think this is a pro for JS tho

- Yes there is LLVM for example

- Have you heard of Laravel ?

- No, there is already python for that, use the right tool for the right job

Today PHP is a really really good language to get scalable apps up and running, moreover with frameworks like laravle that comes with tons of batteries included without tanking the performances. But so so many people remains on the good old PHP dead trend just because it's easier to ignore all the great evolutions pf the past decades

3. ksenzee ◴[] No.45188892[source]
That’s a perfectly valid argument. I’m not saying people shouldn’t make that argument. I’m just saying I don’t want to hear about mysql_real_escape_string.

To answer your question, I don’t know that modern PHP has big advantages over other modern languages. I’m not knocking on doors to spread the gospel of Symfony. But there’s no need to switch away from it either. And hosting is still easy and cheap. Prototyping your product as a Laravel or Symfony app is a reasonable choice.

4. scotty79 ◴[] No.45189073[source]
Share nothing request handling. It's like lambdas but without cloud bs.
replies(1): >>45189194 #
5. ksenzee ◴[] No.45189194[source]
That’s a really good analogy, thanks.
6. kmoser ◴[] No.45189258[source]
The appeal of something like PHP these days is not that it has any particularly unique features, but that it is ubiquitous, has withstood the test of time (meaning it's relatively bug-free), is well supported (meaning it won't disappear any time soon), and is relatively easy to find developers for. Those features alone make it a contender for projects that don't need a specialized language.
replies(1): >>45189510 #
7. Calavar ◴[] No.45189510[source]
I don't buy that. You can't have it both ways. You can't discount PHP4/5 criticism because PHP7+ is good and then in the same breath hold PHP above other tech stacks for passing the test of time, not when PHP7 is younger than Rails, Django, and React (and even Vue). Those frameworks have passed the test of time more than PHP7+.
replies(1): >>45189647 #
8. paulryanrogers ◴[] No.45189647{3}[source]
Those other projects have also had plenty of backward-compatibility-breaking major versions.