this post was submitted on 26 Oct 2026
96 points (100.0% liked)
technology
24511 readers
37 users here now
On the road to fully automated luxury gay space communism.
Spreading Linux propaganda since 2020
- Ways to run Microsoft/Adobe and more on Linux
- The Ultimate FOSS Guide For Android
- Great libre software on Windows
- Hey you, the lib still using Chrome. Read this post!
Rules:
- 1. Obviously abide by the sitewide code of conduct. Bigotry will be met with an immediate ban
- 2. This community is about technology. Offtopic is permitted as long as it is kept in the comment sections
- 3. Although this is not /c/libre, FOSS related posting is tolerated, and even welcome in the case of effort posts
- 4. We believe technology should be liberating. As such, avoid promoting proprietary and/or bourgeois technology
- 5. Explanatory posts to correct the potential mistakes a comrade made in a post of their own are allowed, as long as they remain respectful
- 6. No crypto (Bitcoin, NFT, etc.) speculation, unless it is purely informative and not too cringe
- 7. Absolutely no tech bro shit. If you have a good opinion of Silicon Valley billionaires please manifest yourself so we can ban you.
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
PHP's selling point was basically being able to embed into html. That's obviously possible with any language; it's not hard at all really, I think you call that a template engine. But PHP had that as its core idea. Many a webhoster enabled PHP in the 90s, meaning it was easier to deploy than other languages, which would have to go through CGI (common gateway interface, a protocol for handing HTTP requests to scripts/binaries, which is how you traditionally interfaced a web request with e.g. a Perl or C program). CGI also spawns a process each time, which is slow, whereas PHP came as an Apache plugin.
So PHP won over Perl, which had a head start in that space, I think mainly due to convenience and the because webhosters supported it.
Perl is a better, more well thought out scripting language arguably, but was created as an alternative to Unix shell scripts, and not web-first. Also it's more complex. PHP is more straightforward and C-like.
The complaints about PHP, and I share them, is that PHP was not only for amateurs, it was created by amateurs. In some earlier version of PHP, for example, something like this:
would have to be written as
which is just ridiculous. People had figured that out in the 60s, maybe even earlier, and that had worked in every language since then. The creator of PHP would have to have never read a book or attended a course on language design, garbage collection, compilers, parsing, or probably any other relevant topic. They were totally winging it. In versions 4 or 5, PHP copied, in a cargo-cult like fashion, various object oriented features from C++ without deliberate thought. The built-in standard library, while extensive, was notoriously inconsistent and easy to misuse, further exacerbated by the fact that PHP loves to convert types silently instead of throwing an error.
It really deserves its place in the hall of fame of the worst languages. Most of the things up there (like Unix shell or BASIC) came way earlier, and at least you can see how and why they are as they are, but PHP is totally born from ignorance (or rather superficial half-knowledge) of what came before.
It's still around because frameworks like Wordpress, Mediawiki (Wikipedia) and various legacy websites have not transitioned to something else because it would be a monumental task to migrate all this shit.