r/ProgrammerHumor • • Oct 29 '26

Meme magicQuotes

Post image
2.4k Upvotes

77 comments sorted by

468

u/g_calgary Oct 29 '26

If you remember magic quotes, it's probably time to book a colonoscopy 👍

44

u/ankle_biter50 Oct 29 '26

I remember those... in a book on the history of php

I'm a poser, I do not know what magic quotes are, and i do not know why they are good for php, and i have no idea why staying on php 4 is good

71

u/g_calgary Oct 29 '26

It was a global setting intended to prevent SQL injection attacks where PHP would automatically escape special characters in any string passed via POST or GET. But if you didn't use it right it would cause f'n chaos. Lol

-112

u/a-r-c Oct 29 '26 edited Oct 29 '26

insane that you fell for it smdh

explaining the joke kills the joke (reddit hates this simple truth)

edit: see? they're seething.

51

u/backfire10z Oct 29 '26

I’ve never heard of magic quotes, so I appreciate the explanation.

7

u/ankle_biter50 Oct 30 '26

I said it as a joke that it's old. Explaining what magic quotes are was not part of the joke, and was very much appreciated. I wanted to still joke without sounding like an idiot asking "duhhh what are those things?" So I made a joke and put in spoiler text that I don't know what I'm doing. Anyone can scroll by and let it be or see my confession and answer however they see it

99

u/tsammons Oct 29 '26

Next progression is Perl dev hospice. Thanks for the reminder.

2

u/Majik_Sheff Nov 01 '26

The devs are in hospice.  The code itself is still quietly keeping dark but important parts of the internet from collapsing.

22

u/IslayProgrammes Oct 29 '26

In my defence, I was working on legacy product then and migrating them from 4-7 which let me be clear should have made me leave the industry

8

u/d3matt Oct 29 '26

I have 3 more years thank you very much!

2

u/Denaton_ Oct 29 '26

Built a dynamic documentation system around it back in the days..

40

u/UndGrdhunter Oct 29 '26

Hahaha I remeber when de discussion in PHP was if we should start the file with <? Or <?php even <% (fuck you asp tags)

9

u/g_calgary Oct 29 '26

Haha I forgot about that!

7

u/Early_Bookkeeper5394 Oct 29 '26

I wanna know what that font on the bottom right is. The mono one. It's beautiful

7

u/g_calgary Oct 29 '26

It's Ubuntu Monospace 👍

3

u/Early_Bookkeeper5394 Oct 29 '26

Thank you so much

19

u/KarltonPeaks Oct 29 '26

Girls shallow

Boys quirky and deep, am i right??? 🤣

8

u/g_calgary Oct 29 '26

It is a sexist meme format in its original form, I agree. Not sure there is a better equivalent.

5

u/BagnacaWillow Oct 29 '26

1

u/Aozora404 Oct 30 '26

That’s sexist in the other way

18

u/NoBee4959 Oct 29 '26

Seems like the opposite in the original. Girls doing some personal or emotional things and boys being idiots with the Time Machine

96

u/Dahns Oct 29 '26

Magic quote?... What ancient arcane is this

50

u/[deleted] Oct 29 '26

[removed] — view removed comment

12

u/the-grand-finale Oct 29 '26

as god intended

4

u/Flat_Initial_1823 Oct 29 '26

Escapetion: we need to escape deeper

4

u/[deleted] Oct 31 '26

[removed] — view removed comment

1

u/Majik_Sheff Nov 01 '26

The repetition turns it into comedy.  The survivors of the current iteration won't laugh at the next one, but the one after that will be funny as hell.

33

u/RealSlyck Oct 29 '26

Type safety for life.

1

u/OffByOneErrorz Oct 30 '26

Statically Typed Life

Might get it tatted on my abdomen.

67

u/gburri Oct 29 '26

Why just not prevent Rasmus Lerdorf creating this monstrosity?

71

u/ustp Oct 29 '26

You would like to use JS instead?

0 == "0" //true
0 == []  //true
"0" == []//false

40

u/Foorinick Oct 29 '26

In what situation would you be doing that

98

u/MyAntichrist Oct 29 '26

When you wanna prove a point on how shit JS is, duh.

25

u/ChaseShiny Oct 29 '26

Yeah, that's r/firstWeekProgrammerHumor stuff. We probably should mention something like console.log doesn't actually create a log (with timestamps and such).

3

u/arsenicx2 Oct 30 '26

You know I never thought about the fact they called a print statment console.log I just accepted it.

1

u/ChaseShiny Oct 30 '26

I did the same until I took a class on Python and started talking about logging. You know what's even funnier? The console object even includes different logging levels. You can use console.info or console.error or whatever.

6

u/fghjconner Oct 29 '26

When some api returns a value with a different type than you expect.

4

u/Foorinick Oct 29 '26

Can't you just check if the type is what you want beforehand? Or just... Yk... ===

20

u/tankerkiller125real Oct 29 '26

"Truthy" shouldn't be a thing in any programming language. The fact that Javascript is not just truthy, but inconsistent at best with it is wild. And even more wild is people decided that it was a language they wanted to use in backend infrastructure.

18

u/aabil11 Oct 29 '26

The language was created in a day and the only reason the creator named it that is because Java was popular at the time. And now the entire internet runs on it

6

u/NotADamsel Oct 29 '26

Any language where writing shit like “if foo == True:” is a good idea should be ashamed of itself.

2

u/WithersChat Oct 30 '26

Not quite that, but the weak typing will one day be the death of me.

WHAT DO YOU MEAN YOU ARE COEECING MY ENUM INTO A NUMBER? I LITERALLY OVERLOADED THIS EXACT METHOD TO WORK WITH AN ENUM!

12

u/NiIly00 Oct 29 '26

Typescript makes it bearable.

11

u/illepic Oct 29 '26

TS and my linters would actually slap me in the face for any use of a loose equality operator. It might even put me in a corner for a timeout.

5

u/Foorinick Oct 29 '26

Just make it connect to a shock collar for quicker feedback and longer lesson reminding smh my head 

2

u/Loading_M_ Oct 29 '26

Iirc, most linters explicitly allow loose equality for checking null/undefined, since loose equality checks both.

2

u/illepic Oct 30 '26

All linters "allow" anything. It's just a matter of what your config allows. I haven't seen an eslint config used for real that allows loose equality.

1

u/Loading_M_ Oct 30 '26

Eslint's eqeqeq rule has an option to allow loose equality in some specific cases, including the aforementioned null check case. I haven't looked for projects that set eqeqeq to "smart", but I have to assume there is at least one out there.

6

u/00pflaume Oct 30 '26

And that is why god gave use strictly equal.

Praise the lord and his ===

4

u/gburri Oct 29 '26

Sure not, JS is also a monstrosity. Maybe create a nice Python web framework instead (Python was created four years before PHP) or a simple well-designed typed language like Gleam.
PHP was successfully at that time because it was easy to use with Apache and was specifically designed for web.

10

u/ustp Oct 29 '26

I used python for two years at work... It's nice language, but whitespace hell disqualifies it.

4

u/WithersChat Oct 30 '26

Semantic whitespaces like in python should be a human rights violation.

7

u/Tathas Oct 29 '26

Are you suggesting using python for browser scripting?

1

u/Majik_Sheff Nov 01 '26

Saying PHP was designed is like calling Kowloon Walled City architected.

5

u/addyftw1 Oct 29 '26

To quote famed reverse engineer Lenny Zeltser, "JavaScript is an abomination."

1

u/GodsBoss Oct 31 '26

Great, now the web runs on Perl instead.

Personal note: I had the great opportunity to work with Perl for a project and I can confidently say that I did not expect it to be worse than PHP. It was.

9

u/16bitTweaker Oct 29 '26

register_globals FTW

7

u/CozySweatsuit57 Oct 29 '26

Why not just have the php devs also be girls?

1

u/AppropriateOnion0815 Oct 29 '26

Magic quotes, like in JS's magic semicolon?

-2

u/mylsotol Oct 29 '26

Even better, stop using PHP

5

u/shadowraiderr Oct 29 '26

i knew someone was gonna shit on php for dumb reasons like in every thread lmao

-1

u/mylsotol Oct 29 '26

Dumb reasons like it's constant security problems resulting from it being a poorly designed hobby that went to far?

There are plenty of better options. Pick one

1

u/shadowraiderr Oct 29 '26

brother every language have security problems, do you switch everytime a some new is discovered?

also saying a language is generally better/worse than others is just uneducated statement
there is no language that is generally better or worse than any other, each language is very specific and better for specific use cases, with php being the most used language for websites worldwide

telling ~65% of the websites owners "stop using php bro it is stupid" is also stupid statement

0

u/mylsotol Oct 29 '26

they do not all have the same number of security problems. PHP has had a loooot more because it is poorly designed and inherently insecure. this is like saying Rust is just as insecure as C because someone once used rust to write code that had a flaw. just becasue both can have problems doesn't mean that one isn't better than teh others.

The average lifetime of a website is 2-3 years. I'm not saying imediatly rewrite everything. I'm saying stop using it for new projects. If /when you need a new website don't use wordpress. pick something that doesn't have a history of being the least secure software ever made.

0

u/shadowraiderr Oct 29 '26

you're funny because most of the "loooot more" security issues you didnt really mention can be avoided just by not writing flawed code, just like you mentioned with rust and C lmao

3

u/mylsotol Oct 29 '26

rust actually makes it hard to write flawed code... where as php makes it extremely easy...

you can be wrong if you want. have fun with php.

3

u/shadowraiderr Oct 29 '26

ah yes, the typical "just jumped on the php hate train" type of arguments lmao

3

u/mylsotol Oct 29 '26

I've been on that train since I started professional web dev

1

u/grethro Oct 29 '26

great magic, I love quotes

0

u/VayuAir Oct 29 '26

4 so that no one forgets

-2

u/RobotechRicky Oct 30 '26

Only true nerds get this joke. 🤣