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
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
Yeah, that's r/firstWeekProgrammerHumor stuff. We probably should mention something like console.log doesn't actually create a log (with timestamps and such).
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.
"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.
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
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.
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.
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.
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
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.
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
468
u/g_calgary 28d ago
If you remember magic quotes, it's probably time to book a colonoscopy 👍
40
u/UndGrdhunter 28d ago
Hahaha I remeber when de discussion in PHP was if we should start the file with <? Or <?php even <% (fuck you asp tags)
7
u/Early_Bookkeeper5394 28d ago
I wanna know what that font on the bottom right is. The mono one. It's beautiful
19
u/KarltonPeaks 28d ago
Girls shallow
Boys quirky and deep, am i right??? 🤣
96
u/Dahns 28d ago
Magic quote?... What ancient arcane is this
33
u/RealSlyck 28d ago
Type safety for life.
67
u/gburri 28d ago
Why just not prevent Rasmus Lerdorf creating this monstrosity?
9
u/16bitTweaker 28d ago
register_globals FTW
7
u/CozySweatsuit57 28d ago
Why not just have the php devs also be girls?
1
u/realkarthiknair 28d ago
Spaceship.
1
u/AppropriateOnion0815 28d ago
Magic quotes, like in JS's magic semicolon?
-2
u/mylsotol 28d ago
Even better, stop using PHP
1
u/grethro 28d ago
great magic, I love quotes
-2
u/Winter-Bear9987 28d ago
r/pointlesslygendered (kinda?)
0
u/VayuAir 28d ago
4 so that no one forgets
0
u/VayuAir 28d ago
4
-2
u/RobotechRicky 28d ago
Only true nerds get this joke. 🤣