1074

Source.

Yep, PHP is turning 30 this year! Wondering if "PHP is still relevant?" Ever since we have been hearing that PHP is dead. It was “dead” 10 years ago, 5 years ago, and “is dead” today. But somehow - it isn’t. Anyway... happy birthday!

top 50 comments
sorted by: hot top controversial new old
[-] magic_lobster_party@fedia.io 133 points 2 weeks ago

PHP will remain alive as long Wordpress is still being used.

[-] Scrollone@feddit.it 24 points 2 weeks ago* (last edited 2 weeks ago)

But let's not forget that the WordPress codebase is absolute dogshit.

And not an example of how to write proper modern PHP.

[-] Decq@lemmy.world 98 points 2 weeks ago* (last edited 2 weeks ago)

Let's be honest though. The early PHP versions were absolute dog shit. And the definition of how not to design a programming language. That said, that never stopped anyone in web development from using it apparently. No clue what modern PHP looks like, apparently it's better now.

[-] thesystemisdown@lemmy.world 21 points 2 weeks ago

Modern PHP is better because it's modern. Which early version of a programming language was good? I've used a lot of them, and by modern standards, I think dog shit is a somewhat appropriate description for most of them.

[-] azertyfun@sh.itjust.works 15 points 2 weeks ago

It's one of a plethora of scripting languages from the '90s which were designed to be the antithesis of "fail fast" and kept going no matter what.

I guess what with C/C++ being the Mainstream Option at the time, not having to deal with a strict compiler must have felt like freedom. As someone who has had to maintain, cleanup and migrate ancient PHP code, I call it folly. That mindset of "let the programmer just do whatever and keep trucking" breeds awful programming practices and renders static analysis varying degrees of useless, which makes large-scale refactoring hard to automate which is just amazing when your major versions aren't even remotely FUCKING BACKWARDS COMPATIBLE.

PHP's original design is just fundamentally atrocious. It became popular in large part because unmaintainable code is usually someone else's problem.

A language that I would definitely use for server-side rendering and that was already good from its first stable release is Go. It was thoughtfully designed and lends itself really well to static analysis, while still being easy to write and decently performant.

load more comments (3 replies)
[-] chunes@lemmy.world 11 points 2 weeks ago

I've never heard of a programming language that people don't consider shit

load more comments (1 replies)
[-] friend_of_satan@lemmy.world 10 points 2 weeks ago* (last edited 2 weeks ago)

IMHO the killer feature was mod_php. Writing server-side website logic was stupid easy with that. I think if it weren't for that, php wouldn't have been nearly as popular.

I quit using it like 10 years ago, but I'm happy with what I did with it and got from it.

load more comments (1 replies)
[-] BlameTheAntifa@lemmy.world 80 points 2 weeks ago

In PHPs defense, it keeps evolving in positive, meaningful ways. If you are up to date with it, it’s quite sophisticated and enjoyable. Doubly so if you use a framework like Laravel.

[-] mriswith@lemmy.world 20 points 2 weeks ago* (last edited 2 weeks ago)

Most memes or jokes referencing a direct problem in PHP, are old or made by people who haven't touched the language in a decade(version 7 was in 2015, and it removed/fixed a lot of issues and added needed features).

There's also the huge looming thing that a lot of programmers forget: Websites like Wikipedia run on PHP, not to mention the amount of WordPress and similar websites are out there. Which means it will keep going strong. And for a while Facebook also used quite a lot of it, to the point where they made a rudimentary compiler instead of rewriting parts in more efficient languanges.

load more comments (1 replies)
load more comments (5 replies)
[-] lime@feddit.nu 57 points 2 weeks ago

my entire way of reasoning about programming languages changed when i read on article about how hating on php was misogynistic. i clicked on it because it just sounded like yet another ragebait, but it made sense.

basically, since php is simple, and integrated with html, the vast majority of php devs started out as designers who later got into code. since php has always been a mess, nobody wanted to build mainstream tooling for it except the people actively working with the language. this means that mainstream ideas about language and tooling design didn't percolate down to php like it has done to most languages. so php devs, when exposed to tooling the rest of the world takes for granted, are usually overwhelmed because not only is there a lot of it, nobody in php-land uses tools like that. so they get called bad devs of a bad language. some of them, who really like to code, push through this massive difficulty spike, while others just assume that "actual programming" is too hard and go back to design, even though tooling usage has little to do with your skill as a programmer.

the kicker, of course, being that web design has more women than most other dev specialisations.

[-] kshade@lemmy.world 26 points 2 weeks ago

Is disliking something that (allegedly) is more popular with women than the average thing of its category anti-woman, even if no part of the complaint involves the user or their gender? The majority of users is likely still male anyway.

[-] lime@feddit.nu 20 points 2 weeks ago

not directly, but trash-talking it and gatekeeping "real programming" from the language most likely to be used by women is not exactly conducive to improved equality in the profession.

i realise now that i didn't explicitly mention my point in the first post, so:

  • shitting on other people's jobs is bad.
[-] kshade@lemmy.world 9 points 2 weeks ago* (last edited 2 weeks ago)

So PHP may be trash, but don't treat the people using it like trash? Makes sense to me.

load more comments (1 replies)
load more comments (2 replies)
[-] lilja@lemmy.ml 18 points 2 weeks ago

In the start of my career I felt that there was a sentiment around web dev that it's not "real" programming in a way. Not sure if that's the case any more seeing as the majority of modern develoment is for web platforms.

I've never heard the idea that PHP is a language used by web designers who migrated to coding, but it kind of makes sense. How PHP works, where everything is just HTML until the <?php tag comes in, made it so attractive as a way to add some spice to static pages. I cut my teeth on PHP and moved on to other languages later, so it makes sense that it would function as a gateway drug of sorts, also resulting in it not getting the attention from seasoned experts that other languages benefit from.

Calling dislike of PHP misogynistic feels like a massive stretch.. but maybe it's not considering how the designer/programmer divide also has a massive gender disparity. PHP has its problems, tooling being just one side of it, and its nature as a designer-friendly language makes it easy for elitists to mask their bigotry behind "objective" arguments that PHP is bad.

load more comments (1 replies)
[-] magic_lobster_party@fedia.io 13 points 2 weeks ago

The main issue with PHP is that it’s designed for a pre AJAX web. Before when there was a real distinction between backend and frontend. The idea with PHP is that the server code is responsible of generating HTML on the fly.

Server code generating HTML is icky in modern web development.

[-] lime@feddit.nu 26 points 2 weeks ago

it's what html was designed for. there's nothing icky about it. with htmx et al the serverside web is coming back in a big way so we can finally drop this react stuff.

load more comments (2 replies)
[-] shnizmuffin@lemmy.inbutts.lol 20 points 2 weeks ago

Server code generating HTML is icky in modern web development.

There's been a big uptick in interest around SSR lately, so maybe not.

[-] eager_eagle@lemmy.world 16 points 2 weeks ago

What's actually icky is making a website an SPA, duplicating business logic in the back and front, when it could perfectly be served as a server side rendered HTML.

[-] drmoose@lemmy.world 9 points 2 weeks ago

What absolutely no. Server side generated code is still king in the right hands. Why have client lift all of thay when server side html rendering basically costs nothing. Even strong js driven front end you can still add much through server side by providing proper hydration paths. Good devs take advantage of both worlds but server side is incredibly powerful today.

load more comments (8 replies)
load more comments (1 replies)
[-] merc@sh.itjust.works 49 points 2 weeks ago

Where I live, I still see people in a horse-drawn wagon. So, I guess horse-drawn wagons never died? It's only used for tourists and weddings, but that counts, right?

According to Tiobe, PHP was the programming language of the year in 2004. In 2010 it was number 3 in the top 10 programming languages. It's now out of the top 10 entirely. There really isn't a language that has completely disappeared. Mainframes are still programmed using COBOL, Scientists are still using FORTRAN, even Lisp, which has been around since the 1950s, is still going strong.

Maybe Actionscript counts as truly dead, since it was tied to Adobe Flash, and Flash is truly dead?

I have a lot of bad memories of PHP. It was, for a brief time, the main language I used, but it was so ugly and inconsistent. The only thing I loved about it, at the time, was that it wasn't Visual Basic. As bad as PHP was, at least I wasn't making web pages in that pile of hot garbage. But, I never felt joy writing something in PHP. At best it was a slog. At worst it was like pulling teeth.

Just about every other language has given me moments of fun. Original Javascript was a mess, but it already contained scheme-like features. It was sold as being an interpreted version of Java, but it had features that Java wouldn't have for at least a decade. C is a brutal and unforgiving language, but as long as you're not working with strings, it's great to have such low-level control over everything.

Maybe PHP has evolved like other languages, but I still am not interested in trying it out. Everything it was good at can be done better by other languages, and those are languages that give me joy, not pain. I hope it keeps dropping in the rankings so that people aren't exposed to it as one of their first languages.

[-] kameecoding@lemmy.world 15 points 2 weeks ago* (last edited 2 weeks ago)

Yeah, I think this is a more fitting meme to be about Java, because despite all the java is dead articles it's still like one of the top most used language, if anything is a serious backend service it likely runs on Java.

load more comments (7 replies)
[-] PumaStoleMyBluff@lemmy.world 10 points 2 weeks ago

There are still Amish and Mennonite communities who use horse-drawn wagons and farm implements their whole lives.

Not really meant to be an argument to your point, just interesting to know.

load more comments (1 replies)
load more comments (8 replies)
[-] darvit@lemmy.darvit.nl 43 points 2 weeks ago

Everyone in this thread: PHP sucks because it was bad when I last used it 20 years ago.

[-] ICastFist@programming.dev 18 points 2 weeks ago

It's still bad nowadays, and it's the main language used on pretty much every system of several state level secretaries in Brazil. My colleagues work with it daily (I don't program, thankfully) and they're not exactly fond of it. Legacy systems, man

[-] dreadbeef@lemmy.dbzer0.com 10 points 2 weeks ago* (last edited 2 weeks ago)

Backend devs: JS sucks because I never learned it actually

[-] TheKingBee@lemmy.world 9 points 2 weeks ago

I mean it does suck, but it sucks less than anything else we have.

[-] balsoft@lemmy.ml 13 points 2 weeks ago* (last edited 2 weeks ago)

PHP is far from "least bad language". Nowadays it is an ok language, one of many. You can also write ok code in it. The main issue is that it's really easy to write horrible shit that just barely works and will break when you look at it wrong. In fact without a lot of knowledge and experience that is the code you will probably write.

There are much better languages for any webdev niche you can think of, and some that are just better for webdev overall (e.g. Elixir). The reason PHP is still relevant is mostly huge legacy codebases that require a lot of engineering power to maintain (because PHP is not a good language for maintenance).

The way I look at it is that PHP is the C++ of webdev (but slightly worse).

load more comments (7 replies)
load more comments (1 replies)
[-] TomMasz@piefed.social 34 points 2 weeks ago

It's old and ugly, the worst tool you can use for anything, and unkillable.

load more comments (3 replies)
[-] jenesaisquoi@feddit.org 27 points 2 weeks ago* (last edited 2 weeks ago)

Ah yes, the language that picked strlen as the hash function for its hashtables.

[-] Blackmist@feddit.uk 15 points 2 weeks ago

Javascript is living proof that your language doesn't need to be good to be used.

I tripped over this one in Delphi the other day.

function AnsiStartsText(const ASubText, AText: string): Boolean;
function AnsiEndsText(const ASubText, AText: string): Boolean;
function AnsiContainsText(const AText, ASubText: string): Boolean;
load more comments (1 replies)
[-] keepee@lemmy.world 9 points 2 weeks ago

Can you elaborate on this?

load more comments (1 replies)
load more comments (2 replies)
[-] ursakhiin@beehaw.org 26 points 2 weeks ago

PHP will never die. As long as code is written there will be PHP developers there to claim it's good now.

load more comments (1 replies)
[-] JimVanDeventer@lemmy.world 25 points 2 weeks ago

Happy 44th birthday IPv4! 🥳

[-] cupcakezealot@piefed.blahaj.zone 23 points 2 weeks ago* (last edited 2 weeks ago)

this is perl erasure

also php didn't cause the internet to suck; overreliance on javascript (and js based frameworks) did. there's a reason that modern internet is so slow and clunky and it's not php. at least php has the capabibility to improve over time not degrade.

[-] Simulation6@sopuli.xyz 22 points 2 weeks ago

Well, at least PHP isn’t as bad as JSP.

[-] SpaceNoodle@lemmy.world 21 points 2 weeks ago

Replaced the P in LAMP with Python when I started building webpages again a few years ago, and never looked back. Such a vastly more pleasant experience.

[-] petersr@lemmy.world 9 points 2 weeks ago

I am an advocate for LKPPR (Linux, Kubernetes, Postgres, Python, React). Doesn't roll off the tongue that well.

load more comments (6 replies)
[-] paulbg@programming.dev 17 points 2 weeks ago

bro ive been doing fullstack js dev for severals years to then realize php is superior💀

load more comments (6 replies)
[-] josefo@leminal.space 17 points 2 weeks ago

It's true that the fuckers that stayed in PHP now are getting paid insane amounts of money to maintain systems? I've heard they are the new cobol people.

[-] leds@feddit.dk 16 points 2 weeks ago

Maybe 25 years ago i build my first website for a paying customer ( my dad). I decided to go for php which was new to me at the time.

I figured it would be too risky ( even back then) to have PHP generate dynamic pages so instead I had php generate static html.

So whenever website needed updating , for example a new folder with images was added, you could just load the admin.php and it would generate gallery pages for you.

Would probably still work 25 year later if wasn't eventually replaced with some WordPress or something

[-] Zachariah@lemmy.world 15 points 2 weeks ago

for many websites, this is the ideal way to do it

makes it order of magnitude more secure

[-] MonkderVierte@lemmy.zip 10 points 2 weeks ago

And performant. And accessible. And compatible.

[-] nicgentile@lemmy.world 16 points 2 weeks ago
[-] Pro@programming.dev 26 points 2 weeks ago

It should be rewritten in rust, any way.

Spoiler/s

load more comments (1 replies)
[-] simonced@lemmy.ml 15 points 2 weeks ago

Array_filter and array_map having the arguments swapped pisses me of so much.!

load more comments (1 replies)
[-] MNByChoice@midwest.social 11 points 2 weeks ago

Yup! Every time we add a new technology, the old does not go away. We just have more (gestures wildly) everything.

When picking a career specialization, don't abandon all the old stuff. Some of it makes a lucrative career after others have moved on (HPC, COBOL, on-site servers).

load more comments
view more: next ›
this post was submitted on 19 Jul 2025
1074 points (100.0% liked)

Programmer Humor

25457 readers
1305 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS