by thriftwy · 4y ago · 0 comments
The beauty of perl scripts, and later php templates, was in their BASIC-like simplicity. They were not secure or structured in any way, but very accessible.
Once you add these frameworks, you realize you could have started with Python or Java in the first place and get more mature infrastructure and better language along the way.
At which point there’s little difference from <everything else>.
And in my opinion PHP tends to be ugly and less readable by default.
The mod_php "share-something" question was always more relevant for ops people.
But architecture of PHP applications is simple and it works. I like simple.
There's nothing PHP specific about share-nothing architecture. It's often refereed to as stateless application layer in other camps.
And, with things like Flask or FastAPI, you get BASIC-like simplicity and immediacy with a language that has a concept-space that scales with your understanding of it.
Now with the cloud that advantage is utterly gone.
Python 1.0: January 1994
PHP 1.0: june 1995
Ruby 1.0: December 1996
Granted, it still happened about a decade and a half ago, so I hoped the sarcasm using the word "new" would come through.
With the advent of Chinese frameworks that solve C1000K problems like swoole, workerman and so on it even found its place as high performance interactive backend server.
If you look at the "multiple queries" results of the web framework benchmarks, you'll notice that the frameworks that use blocking database drivers have similar numbers e.g. raw Symfony is 13,543, whilst Spring is 15,979, despite the JRE being much, much faster.
https://www.techempower.com/benchmarks/#section=data-r20&hw=...
I have the same access to my shared hosting, and the amount of money per year is peanuts.
https://murex.rocks is a static site that costs me pennies each month and has zero scaling issues. The site is fully automated too, built from CI/CD (Markdown converted to HTML) upon commits to a master git branch. But it was purposely designed to run on the cloud.
This isn't to say that shared hosting isn't a worthwhile option, just that cloud can be cheap albeit you do need to architect your project for using the cloud rather than lifting and shifting your existing LAMP stack and expecting that to behave the same.
The big win of those will be tighter frontend and development integrations that are just not as feasible with a different language stack (PHP/Laravel, Python/Django, Ruby/Rails).
What does this mean?
It had its benefits since those amateurs understood their use case and their users' capacity very well. But now all of that is gone and they are still stuck with a subpar language at the core.
The argument is that the language is "awful" and "subpar" because it has "early decisions" like "multiple thousands of built-in" global functions introduced by "language amateurs"?
Sorry, but I remain unconvinced.
I agree that there are real reasons that PHP fails as a language in particular use cases, but it seems rare that those reasons get articulated in these threads.