←back to thread

133 points avan1 | 1 comments | | HN request time: 0s | source
Show context
hu3 ◴[] No.45077689[source]
> In short, the modern PHP ecosystem gives us the best of both worlds: the ability to build quickly and confidently in PHP, while still having powerful options (C, Rust, Go) for performance-critical parts. This hybrid approach lets us stay productive without sacrificing speed where it matters most.

I understand this for a large codebase where rewriting is not feasible.

But if that wasn't the case, a C# APIs achieves both speed of development and execution in my experience. You'll rarely need to reach for C++ or Rust.

PHP is great but the language still doesn't allow things like typed arrays. It will happily accept string in a array of dates, for example.

replies(5): >>45077729 #>>45077935 #>>45078609 #>>45079138 #>>45081157 #
ThinkBeat ◴[] No.45077935[source]
Having been in the C# world for a long time, and the various web/api frameworks.

PHP is really nice if you dig into it, it includes so many great functions and functionality built in for creating web stuff.

It also has a number of issues,. but to quikly put something together PHP take the win in my limited opnion.

replies(3): >>45078266 #>>45079032 #>>45081636 #
reactordev ◴[] No.45078266[source]
The only reason PHP still exists is because of shared hosting companies and Wordpress.

PHP’s initial appeal was you could do scripting on the server side, “turn off PHP with a ?>” spit out normal html, and “turn back on PHP with a <?php”.

For a beginner programmer, it was simple, easy to understand, and had an include so your designs were’t nested table hairball messes of garbage. (but your CSS was definitely garbage).

Today, it’s so easy to run JavaScript, I can build a basic jsx site in under an hour, just like I can with PHP and includes. With Bun, I can quickly write a data access layer as well and wire up crud APIs w/ JWT auth. A weekend project in both.

replies(4): >>45078380 #>>45078415 #>>45078417 #>>45085822 #
monooso ◴[] No.45078417{3}[source]
> The only reason PHP still exists is because of shared hosting companies and Wordpress.

Unfortunately I can't think of anything constructive to say about this nonsense.

> Today, it’s so easy to run JavaScript, I can build a basic jsx site in under an hour, just like I can with PHP and includes.

You assume people agree that it's preferable to work in JavaScript.

replies(2): >>45078921 #>>45079414 #
k_roy ◴[] No.45078921{4}[source]
And still nobody outside of Meta cares about hack.

The niche I think PHP had back in the day has largely been supplanted by Python.

Maybe it’s better now, but after moving on from it to basically anything else after a 25 year career, I don’t miss it.

replies(2): >>45079104 #>>45079354 #
monooso ◴[] No.45079104{5}[source]
I'm not sure what point you're trying to make by mentioning Hack.

At this point it's diverged from PHP to the point that it's basically a different language, is (IIRC) actually slower than PHP 8, and the HHVM doesn't even support PHP any more.

As such, it's not a huge surprise that relatively few people outside of Meta give it much attention.

I also moved on from PHP several years ago, and don't miss it. That doesn't mean I don't recognise that there are still perfectly legitimate reasons to choose it.

replies(1): >>45079537 #
1. k_roy ◴[] No.45079537{6}[source]
Yep.

And meta/hack is probably the other huge mainstay of PHP outside of what the person you responded to said. And hack with HHVM was supposed to be the panacea for PHP

Just saying.

What people used to use PHP for tasks, has largely been replaced by Python.