←back to thread

123 points jonfelsar | 3 comments | | HN request time: 0s | source
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 #
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 #
1. 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 #
2. 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 #
3. paulryanrogers ◴[] No.45189647[source]
Those other projects have also had plenty of backward-compatibility-breaking major versions.