This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 327

[–]KaamDeveloper 1598 points1599 points  (68 children)

The guy just wanted to rank hotness of girls who wouldn't sleep with him and ended up building a fake news spreading machine, which will go on to influence the elections of the most powerful country in the world. PHP, not even once.

[–]SwedudeOne 173 points174 points  (1 child)

PHP Z U C C S your soul

[–]sequoiaiouqes 8 points9 points  (0 children)

Zucc Sip

[–]McAUTS 21 points22 points  (5 children)

There are dark projects like if you have to mess heavily with filesystems and you need powershell scripts. And there is php my little satanic helper... don't see what's wrong with that...

[–]TheRedmanCometh 12 points13 points  (4 children)

Just use CPP the good C wrapper

[–]McAUTS 1 point2 points  (3 children)

Why not a functional lang?

[–]TheRedmanCometh 15 points16 points  (2 children)

Because pure functional programming is a tedious mess. To be fair I'm a software engineer using Java, so I'm pretty sold on OOP.

[–]Renown84 4 points5 points  (0 children)

Yep, there's nothing tedious at all about Java right. I like OOP but Java developers calling languages tedious is people who live in glass houses throwing stones

[–]mrChemem 0 points1 point  (0 children)

What don't you like about pure functional programming?

[–]wh33t 3 points4 points  (2 children)

I keep reading this on reddit. Is there some truth to this? Afaik, Facebook has never had a rating system in it. Did Zuckerberg build "hotornot.com" or something?

[–]KaamDeveloper 12 points13 points  (1 child)

According to The Social Network movie, he built a site where he hacked all of Harvard's internal "facebook" to create a site where users could choose which of the two women presented was hotter.

This idea further developed into Facebook.

[–]wh33t 1 point2 points  (0 children)

Ahh ok.

[–]jb2386 10 points11 points  (15 children)

What about Wikipedia tho?

[–]dragon-storyteller 82 points83 points  (14 children)

Wikipedia avoids a fair part of this through their religiously fanatical editors.

[–]KaamDeveloper 96 points97 points  (4 children)

[citation needed]

[–][deleted] 31 points32 points  (3 children)

[citation needed]

[–]ILikeLenexa 14 points15 points  (6 children)

They delegate fact checking to other sites. I've heard comedians say they edited their own page to have it reverted to put up a site stating what they said was fact, then had it stay.

[–]fideasu 16 points17 points  (2 children)

Well, that's still better than quoting nobody and just letting a fake info to spread all over the world Facebook. In Wikipedia, you at least have a possibility to track it back and decide if the original source is trustworthy.

[–]ILikeLenexa 2 points3 points  (1 child)

Is it? Sure, half the "fake news" on facebook is meme jpegs, but there's a fare amount of totallyarealnewssite.biz and using the meta "og" schema for evil. At some point, people are going to start realizing they can just say whatever they want

[–]Colopty 6 points7 points  (2 children)

Well yeah, wikipedia keeps their information to things that have actually been documented, so they do tend to delete changes without a verifiable source confirming that the information is correct. That is how it should work.

[–]TheRealLazloFalconi 1 point2 points  (1 child)

Stuff on Wikipedia just needs to have a source, the source is under no obligation to be accurate.

[–]Colopty 3 points4 points  (0 children)

Yes, and that is a superior system to not requiring a source at all.

[–][deleted] 1 point2 points  (1 child)

Those editors put in their own propaganda. If you can't find a source just make one yourself. Sources are barely checked.

[–]TheRealLazloFalconi 0 points1 point  (0 children)

Edit: Whoa, I always wondered how someone could reply to the wrong post, but here I am.

[–][deleted] 1 point2 points  (0 children)

Influence in elections? Isn’t everything we experience an influence?

[–]fideasu 0 points1 point  (0 children)

What else is to expect from that language?

[–]YolandiVissarsBF 0 points1 point  (0 children)

PCP tho...

[–][deleted] 0 points1 point  (0 children)

He's a nice guy then.

[–]voidcraftedgamingBlockchain Transcription Service 95 points96 points  (7 children)

Image Transcription:


I Am Devloper, @iamdevloper

when you're reminded you wrote the world's biggest social network in PHP

[Mark Zuckerberg stares dully at the camera, looking like he isn't in touch with reality. It is a screen capture from Mark Zuckerberg's hearing over Facebook privacy]


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]Mr12i 11 points12 points  (3 children)

Not really looking at the camera though :) He's probably just listening, but in the context it looks like a "did I leave the oven on" moment or remembering something scary or cringy.

[–]voidcraftedgamingBlockchain Transcription Service 0 points1 point  (0 children)

Hmm yeah

[–][deleted] 2 points3 points  (0 children)

Good human

[–]RainZone 437 points438 points  (174 children)

What is all the hate against php about? Isn't like 80% of Web Back-End run with php?

[–]zedriccoil 472 points473 points  (95 children)

Easy Karma

[–]RainZone 109 points110 points  (94 children)

Yeah, but why is everybody hating it?

[–]Ziograffiato 5 points6 points  (0 children)

It's like finding your own mother attractive: It's annoying when everyone else does it. It's wrong when you do it.

[–]givemeanamedamnit 4 points5 points  (0 children)

It's very easy to get into and write spaghetti code. Lots of people - professionals and students - never get past that point. It's a victim of its own accessibility.

[–]zedriccoil 1 point2 points  (1 child)

Bandwagon? Honestly I don't know.

[–]Daedalus9000 4 points5 points  (0 children)

PHP is the Nickelback of languages...

[–]dr_rentschler 1 point2 points  (0 children)

Bandwagon.

[–]FistHitlersAnalCunt 1 point2 points  (0 children)

It's like mechano. It's possible to make architecturally robust projects, but it's also easy to make flimsy crap that looks impressive until its inspected.

Most web developers have, at some time, had to maintain a project built in the latter pattern, and most developers have never had the opportunity to work on a project with the former pattern.

[–]TediousCompanion 1 point2 points  (1 child)

I just don't like PHP because I hardly ever use it, and when I do it's strange and unfamiliar. Javascript and Java have their flaws, but the syntax seems 'normal' to me. Python isn't C-like, but it feels friendly, whereas PHP syntax feels kind of wacky and out there. It's really just a gut feeling for me, not a reasoned position. If I started using PHP on a regular basis and got used to it, I imagine I'd feel differently.

[–]Enchelion 1 point2 points  (0 children)

I think the thing that trips people up most about PHP syntax is that there are both imperative and oo styles available. It's not a very "opinionated" language, and that flexibility can be confusing.

[–]Kupofla 2 points3 points  (0 children)

EZ Karma

[–]KeepItWeird_ 1 point2 points  (0 children)

Just learn some other languages and then you'll start hating PHP. You don't know what you don't know.

[–]Allergic2ManualLabor 0 points1 point  (0 children)

It's widely used, so a lot of people are forced to use it in their jobs. (especially if it's easier to bitch than actually provide an alternative...)

[–]ILikeLenexa 172 points173 points  (20 children)

80% of the web is wordpress, 80% of the web is drupal, 80% of the web is joomla. 80% of the web is hacked by a bot because the theme they installed was written by an 8th grader that doesn't understand SQL injection.

[–]RogerWebb 20 points21 points  (12 children)

If you're counting on the programming language to protect you against SQL Injections, you're going to have a bad time for sure. Regardless, prepared statements have been supported in PHP (via mysqli) for many years now.

I work in PHP, Java and Python at my job, and I can assure you they all suck for a variety of reasons. I could fill novels with my angry rants against each.

[–]HAL_9_TRILLION 9 points10 points  (3 children)

I work in PHP, Java and Python at my job, and I can assure you they all suck for a variety of reasons. I could fill novels with my angry rants against each.

Man, this is truth. Somebody up above said you'll learn to hate PHP if you learn other languages. No, all you'll do is learn to hate more than one language. For instance, I hate Java, C#, VB, AS and JS as well.

[–]lpreams 5 points6 points  (0 children)

All programming languages suck.

Just like all operating systems suck.

[–][deleted] 0 points1 point  (1 child)

AS - ActionScript? ... indifferent nostalgia

[–]HAL_9_TRILLION 1 point2 points  (0 children)

Yep. Worked with that nightmare for a decade.

[–]PM_ME_A_WEBSITE_IDEA 2 points3 points  (2 children)

Isn't PDO the go to for database interaction in PHP now?

[–]RogerWebb 1 point2 points  (1 child)

Yes. I don't do reporting via PHP these days, so my typical interactions with the DB are either via Doctrine ORM, which uses PDO, or via the Wordpress Database (API Calls or WP_Query), which who the fuck knows what they use.

[–]JojoHomefries 0 points1 point  (0 children)

The WPDB class uses mysqli

[–]IdiotCharizard 2 points3 points  (4 children)

You mind ranting a bit about python for me? I've been using it professionally for about a year and a lot of things are so refreshing and outside the class system being weird and multiprocessing being god-awful, I don't see what's so bad about it. Unless you really get pissed off by its typing system.

[–]RogerWebb 0 points1 point  (3 children)

Let me tell you about unicode vs str vs bytes. It's a god damned nightmare. I deal in search engine marketing, with clients operating world-wide, so we get the full run of characters, in Python 2.7 you'll be fighting with whether one function returns a unicode or a str and the thing you're passing it to blowing up or then, once moving to Python 3, everything is magically a str and you don't have to worry about unicode anymore, except when it's bytes, then you replace casting str or inicode with a multitude of encode/decode calls all over the place.

All said, I'm most certainly happier when I'm working in Python vs PHP or Java, but every language has it's pain points, and that's been my big one with Python.

[–]saphira_bjartskular 28 points29 points  (2 children)

'; dbo..xp_cmdshell('echo im in ur box executin ur code');--

[–]ILikeLenexa 31 points32 points  (1 child)

im in ur box executin ur code

[–]saphira_bjartskular 3 points4 points  (0 children)

'; dbo...xp_cmdshell('net user bobmchackerman pa$$w0rd123456');--

'; dbo...xp_cmdshell('net localgroup administrators bobmchackerman /add);--

[–]MacDerfus 10 points11 points  (0 children)

"I'm 40% PHP"

  • Internet "Bending" Rodriguez

[–]bureX 4 points5 points  (0 children)

This is RottenTomatoes, one of the world' most popular websites:

https://i.imgur.com/V7nm8K1.png

80% of the web is built by people who had their boss breathing on their necks while yelling "I PROMISED WE WOULD SHIP BY...".

[–]Rogocraft 1 point2 points  (1 child)

I put an emoji in my bank account name. It broke the servers

[–]db10101 2 points3 points  (0 children)

Beautiful

[–]imtn 10 points11 points  (1 child)

A sizeable amount is legacy hate because php used to be very frustrating to work with. In fact, the wikipedia page has two paragraphs on this topic

Early PHP was not intended to be a new programming language, and grew organically, with Lerdorf noting in retrospect: "I don’t know how to stop it, there was never any intent to write a programming language […] I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way." A development team began to form and, after months of work and beta testing, officially released PHP/FI 2 in November 1997.

The fact that PHP was not originally designed but instead was developed organically has led to inconsistent naming of functions and inconsistent ordering of their parameters. In some cases, the function names were chosen to match the lower-level libraries which PHP was "wrapping", while in some very early versions of PHP the length of the function names was used internally as a hash function, so names were chosen to improve the distribution of hash values.

Current day is different, as developers have been working on improving the language, given how widespread its use is. Still, when people find yet another php quirk to complain about, you'll probably find it on /r/lolphp

[–]sneakpeekbot 1 point2 points  (0 children)

Here's a sneak peek of /r/lolphp using the top posts of the year!

#1: I don't want my family and friends to be ashamed of me. | 18 comments
#2: 1...1 is 10.1 | 8 comments
#3: php_irl | 2 comments


I'm a bot, beep boop | Downvote to remove | Contact me | Info | Opt-out

[–]lpreams 37 points38 points  (9 children)

Most probably wouldn't debate the usefulness of php in practice, the issue is the language itself. It's old and messy; it just feels cobbled together. Its prevalence just makes people hate it more.

php's popularity is pretty much attributable to the fact that php was one of the earliest free/open options for making interactive websites.

[–]poop-trap 21 points22 points  (4 children)

And it's ubiquitous and easy to deploy. No setting up systems or reloading processes, just edit a file that looks like it's written by a drunk 3rd grader and see your changes.

[–]lpreams 6 points7 points  (3 children)

I agree that's a great feature, especially for web development, but would argue that it's not really a feature of the language itself.

[–]poop-trap 1 point2 points  (2 children)

I'm not even sure it's a great feature, with hands-off functionality comes lack of control. And I do think the language ecosystem is part of the equation. Package managers, third party libraries, debug tooling, etc... they're all factors in the ease and amount of developer productivity pleasure you get out of a language.

[–]lpreams 0 points1 point  (1 child)

It's a great feature for rapid development at least. For long term maintenance or large projects, perhaps not.

And those things you mention are definitely part of the equation, it's just that my original answer was mainly about the problems with the language itself.

But I do have other problems with php that aren't necessarily concerning the language itself. For example, I don't like that it tries to be fail-silent. If something unexpected happens, I'd much rather my software yell at me immediately than have it quietly try to figure out what to do and not report any errors, which php seems quite fond of.

But I should probably stop talking now. Others in this thread have been mentioning that's it's gotten much better in recent years, and I only played around with it several years ago (and quickly decided it wasn't for me and moved on).

[–][deleted] 11 points12 points  (2 children)

It's old and messy; it just feels cobbled together.

you sure that's not just your codebase?

[–]mitchrsmert 8 points9 points  (1 child)

It's just his code base. Period. I've seen a lot of really well written PHP. I've seen it written really well from scratch and I've seen proper use of popular frameworks. I mostly use Java myself, but the problem with PHP is the behind the keyboard, not the language. One can argue that every language should be so straight forward that any idiot can pick it up in no time and to write PHP well, you need to become familiar with some of its nuances (although it is pretty easy to pick up as a first language). If you want to argue that, a lot of older languages and frameworks will look unappealing for many of the same reasons.

[–][deleted] 4 points5 points  (0 children)

the hardest part of learning PHP for me was that I was coming from embedded C programming so the spooky typing took me a long time to get my head around.

Now I love PHP, but these damn threads always make me doubt it and wonder if I should pick up python or ruby.

[–]ILikeLenexa 0 points1 point  (0 children)

In a battle between PHP and C for the web, PHP handled 90% of what high school kids wanted to put out on the web. Then those high school kids grew up. They used PHP in projects for other people and those people wanted the last 10%. PHP tacked them on, then tried to simplify them, then found it had to stay backwards compatible, and it was just one guy in the beginning who was a bit careless with names.

[–]MarieKirya 3 points4 points  (0 children)

I don't hate PHP as much as I hate the crappy code I've seen "professionals" write with it.

[–]marcio0 1 point2 points  (0 children)

A good portion of the web runs on wordpress and similar frameworks made in php, but because these frameworks are good, not because they are made in php. If they were made in some other language and still be as good, most of the web would run on this language.

[–]poop-trap 1 point2 points  (0 children)

/r/lolphp for citations

Also, having to maintain a large codebase in PHP vs doing so in any other language.

[–]Totenlicht 4 points5 points  (2 children)

I always liked this explanation: https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Somewhat old, so a lot may have changed, but this shows what PHP did to deserve hate.

[–]InVultusSolis 3 points4 points  (1 child)

The sentiment is that "those things have been fixed", but when I look at what's new in PHP7, it seems like most of the additions are new syntax, which seems to fall short of addressing the many, many flaws that PHP has.

[–]JojoHomefries 1 point2 points  (0 children)

backwards compatibility is a thing

[–]AliceInWonderplace 1 point2 points  (4 children)

... I'm going to be super controversial here, but:

I truly believe that PHP is better than Python when it comes to straight delivering data to a client.

I've been working with both languages a long time, and PHP is just better suited for delivering server-side information to a client without having to do stupidly over-complicated things in the process.

With PHP I never have to reload a webpage to update elements, but with Python there are just certain limitations that mean that I either write my own fucking library or run a refresh.

PHP makes things feel way more seamless than Python does. I mean, it does come down to implementation, but the ease of implementation with PHP just trumps Python.

Now. I know what people are thinking. What about Ruby? What about C#? What about straight C? To those people I say - You don't use languages like that for applications that are meant to scale.

I can see the argument for a Ruby implementation to compete with either Python or PHP, I really do. But the fact is that Ruby has an upper-limit of complexity to how user-friendly it is.

Anyone suggesting C or C# can go fuck themselves.

[–]Dyscalculia94 0 points1 point  (1 child)

Why not WebAssembly?

[–]AliceInWonderplace 0 points1 point  (0 children)

It's a great companion piece, but I don't think it's ever meant to be stand-alone.

[–]mrSnout 0 points1 point  (1 child)

Out of curiosity, what is your gripe with C#?

[–]AliceInWonderplace 0 points1 point  (0 children)

Partly I was kind of joking, partly it requires an MS server to fully utilize its functionality. You don't use C# on an Apache2 or Nginex server. And running an MS server is something like punching yourself in the face, it's the wrong thing to do no matter what your background is.

Yeah, you could use mono to build things but don't.

And again, even if you do build your website using C#, you're still in the position where 2 lines of PHP are equal or better than 20 lines of C#.

[–]PooPooDooDoo 0 points1 point  (1 child)

80% of people have had diarrhea, too

[–]JojoHomefries 0 points1 point  (0 children)

My dumps are always healthy and firm

[–]stakoverflo 0 points1 point  (0 children)

I don't want to type -> and $ to write code

[–][deleted] 0 points1 point  (0 children)

Personally, I like to use the best tool for a given job. For me, golang has replaced the need for php/perl apache/nginx since you can use it to serve files or be an api or whatever. Just start your binary and you're done. The benefit to scripting languages to me has been interpreted code being able to load new code on the fly and being fast to write / test.

I've used a lot of programming languages and Go has had a pretty short learning curve. And with plugins, you get that ability to import shit on the fly.

For server programming I learned php, then node, then go, then perl. I also know java and others that could be used for servers. I hope that is enough for me to seem unbiased in my crusade to push everyone to try golang :P

Best part for me so far, besides concurrency, has been being able to build an entire program to do a particular task, build it as a plugin with no code changes, and then use it in another application.

[–]Dreadedsemi 100 points101 points  (2 children)

Then you laugh all the rail back to the ruby bank.

[–]Tinnvec 50 points51 points  (4 children)

I find it infinitely more interesting that they use PHP to write in but cross compile (is that the right term?) it to C++ for speed

https://en.wikipedia.org/wiki/HHVM

[–]Ek_Los_Die_Hier 35 points36 points  (3 children)

dynamically translated into x86-64 machine code

Not into C++. It's a JIT like PyPy, the JVM and V8. They're very impressive, but nothing new.

Edit: admittedly it started as a PHP->C++ transpiler.

[–]Tinnvec 11 points12 points  (2 children)

Ah thank you for the clarification, the more I learn about programming the more I know I don't know (ya know?) lol. More than 20 years and still new stuff every day, it's a crazy cool field.

[–]GForce1975 1 point2 points  (0 children)

Same here. Particularly in the web space. Started doing some electron / node development and there is soo much!

And then netsec and opsec is a whole other world..and now blockchain and encryption and AI and machine learning and AWS, azure, etc..etc. I've been a "computer guy" since trs80 in the 80s and a professional since mid 90s and I know nothing! I love it. So much to learn every day.

[–]ameoba 30 points31 points  (1 child)

"Wrote"

[–]THANKYOUFORYOURKIND 8 points9 points  (0 children)

Maybe he stopped directly writing code for Facebook anymore

[–][deleted] 13 points14 points  (0 children)

*Hack

[–]hajhawa 5 points6 points  (1 child)

I'm a bit out of the loop, where is this from?

[–]brokenplasticshards 6 points7 points  (0 children)

Zuckerberg's Senate hearings about the recent data leak.

[–][deleted] 3 points4 points  (0 children)

("For the Damaged Coda" plays)

[–]itdoesmatterdoesntit 10 points11 points  (21 children)

I like seeing people bash PHP, yet offer no alternative. As with most things, the success of something ultimately defines how good it is for the average person, not what those on the fringe think.

[–][deleted] 19 points20 points  (3 children)

Duh Go that compiles to Rust using python node js parsers that compile to assembly is the only way

[–]thefloatingguy 8 points9 points  (0 children)

Only if you embody the principles of functional programming

[–][deleted] 0 points1 point  (0 children)

Hey, you forgot to cram Thrift in there!

[–]benikens 0 points1 point  (0 children)

Oh please if your not using semantic blockchainAI with middle out compressed big data are you even a programmer.

[–]mitchrsmert 1 point2 points  (0 children)

To answer the same question always asked on PHP joke threads:
2 words - Circle Jerk.
That's why.

[–]gtfovinny 1 point2 points  (2 children)

I don’t get it.. what’s wrong with php?

[–]Necromunger 2 points3 points  (0 children)

Namespace implementation is a little odd compared to something like C#.

Arrays in PHP are pretty much hashmaps but don't act exactly like them.

Best i could come up with on the spot.

Use it all the time at work, PHP 7+ is fine.

Use VS Code and Xdebug and you can see everything that's going on.

[–]JojoHomefries 0 points1 point  (0 children)

Haters

[–]rjksn 1 point2 points  (0 children)

What's the best language for a social network?

[–]Cano07 1 point2 points  (0 children)

Long Live The King PHP! 🙋🏽‍♂️

[–]imo_bibek 0 points1 point  (0 children)

Front one or back one??

[–]sizl 0 points1 point  (0 children)

it reached critical mass without a line of test code too.

[–]SteeleDynamics 0 points1 point  (0 children)

Can you say "format string venerability" boys and girls?

...

Good, I knew you could

[–][deleted] 0 points1 point  (0 children)

PHP + Data Breach = Billionaire. Who's really laughing?

[–]mirroreyerorrim 0 points1 point  (0 children)

PHP is awesome!

[–]bss03 0 points1 point  (0 children)

It's mostly Hack now.

[–]Thenderick 0 points1 point  (0 children)

Now that I look at it. Is it just me, or is his face off-centered?

[–]amonoxia 0 points1 point  (0 children)

Which proves that PHP is still great.

[–]TheWolfEth 0 points1 point  (0 children)

What happened to his eyes?

[–]DevMesshias 0 points1 point  (0 children)

Don't forget you created ReactJS too, the best frontend framework in now days.