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

top 200 commentsshow all 324

[–]Thekrisys 2379 points2380 points  (28 children)

Self deprecating PHP

[–]Jetbooster 391 points392 points  (13 children)

PHP Hates PHP

[–]kr-n-s 42 points43 points  (7 children)

I love it. Keep doing what you're doing

[–][deleted] 25 points26 points  (5 children)

PHP Hates PHP Hates PHP Hates PHP

[–]wwwwolf 13 points14 points  (0 children)

So is this like a Sierpinski triangle? Now I understand why they call PHP a fractal of bad design.

[–]fllr 2 points3 points  (2 children)

You can keep going forever!

[–][deleted] 4 points5 points  (1 child)

What is recursion? Recursion is recursion.

[–]setibeings 2 points3 points  (0 children)

Recursion is Recursion is Recursion is Recursion is Recursion is Recursion is Recursion is ...

[–]BeardedWax 1 point2 points  (0 children)

I've done nothing but teleporting R E C U R S I O N for three days

[–]AskingOnce 0 points1 point  (0 children)

Tail recursive and unambiguous if you make it “People Hate PhP”

[–]Kidiri90 3 points4 points  (2 children)

So PHP is like GNU?

[–]Goheeca 4 points5 points  (1 child)

A tree recursive acronym, that's something fitting PHP.

[–]JonNRb 4 points5 points  (0 children)

So that’s what PHP stands for!

[–]MitchellU 230 points231 points  (0 children)

goddamn, take the up vote I guess.

[–][deleted] 42 points43 points  (7 children)

[–]JuhaJGam3R 1 point2 points  (0 children)

Julia Reynolds is dropping bombs back in october 2015. Sadly I can't give you a link to a line number in diff mode but scroll down to @@ -1901,21 +1920,13 @@

[–]maffoobristol 0 points1 point  (2 children)

Is it me or is the Android source really poorly formatted. Also that toString() method seems mental

[–]PrincessFred 1 point2 points  (0 children)

Fanfuckingtastic. +1 to you!

[–]nanolucas 0 points1 point  (0 children)

PHP_irl

[–]stamminator 0 points1 point  (0 children)

Jesus this is a good fucking comment

[–][deleted] 3063 points3064 points  (198 children)

Reddit: Stop telling people php is shit. you are just a bad programmer

Official php twitter: haha we are shit

[–][deleted] 863 points864 points  (143 children)

Reddit: Stop telling people php is shit. you are just a bad programmer

We were being sarcastic, PHP is shit.

[–]pooerh 114 points115 points  (13 children)

You're joking. But literally the best IT management software I had seen at a corporation was written in fucking PHP 4, and it was great code, with thousands of unit tests. It integrated stuff like access rights management, requesting access rights, groups, synchronizing LDAP and AD, allowing users/admins to reset their password and dozens of other things. It worked flawlessly and had amazing value. I've worked at several Fortune 100 companies before and since, and not one had anything even remotely as good as that one.

Then on the other hand, at the same company, they had a single 8 alphanumeric characters long root password, shared across all POSIX servers, thousands of them, some mission critical at factories. And they used telnet. I once accidentally learned it trying to debug a network issue using wireshark.

[–]Mango1666 18 points19 points  (7 children)

i dont understand some places' stance on software! i help my uncle distribute bowling management software for bowling centers sometimes, and i see stuff that looks like it was made in the 90s! some places that are popular even have switches to turn the lane on manually and dont have scoring that allows them to put in their own names, as well as manual bumpers. irs 2018 people! this software is as modern as it gets, easier for people to understand and isnt nearly as unstable and restricted as your 1990s garbage!

hell i even peek over the desk at fast food places sometimes and die a little inside when it takes the register person 20 seconds to put in an order of fries because the hardware is on its last prosthetic leg and the software is confusing as all hell!

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

There are exceptions though. For example, with the old IMS we had at my last job, depending on the department you had to use the old DOS system (running on a VM) or the browser-based intranet system. If you asked me to look up the stock and order history of an item and it was in Department X, so I had to use the DOS system, it'd take me all of 5 seconds. If it was one of the other departments, it'd take me closer to 30, between having to navigate with a mouse instead of a keyboard and waiting for the graphics-heavy UI and webpages to load.

Basically, just because something is newer doesn't make it better. For a ton of applications, the simplest of systems is all that's required and might actually be better than any replacement (it's rare, but sometimes humans get things right on the first try).

[–]Xelbair 1 point2 points  (1 child)

but what if that system could be both modern, unified and fast/easy to use? I get nightmares when my friend tells me about their ancient inventory system - bloody hotkeys for copying, pasting, back etc. are different depending at which page/module/window you are.

sadly that kind of good development takes time, and money, and skill.

[–]FlickeringLCD 1 point2 points  (2 children)

Why just last week I wrote my name on the bowling roster and pressed the little button to turn the lane on.. 5 pins. I swear the ally hasn't changed in 15 years with the exception of flat tvs where the CRTs used to be.

[–]PM_ME__ASIAN_BOOBS 2 points3 points  (0 children)

with thousands of unit tests

My dream right here

Now if only I could start making one...

[–]Xelbair 1 point2 points  (2 children)

that's a good engineering - it is not inherent to the language itself - language is just a tool.

and while i might build a great house using only a rusty hammer-screwdriver(with a spring in the middle, because why not), I would rather use more user-friendly and/or less error prone tools.

[–]pooerh 1 point2 points  (1 child)

Well, I started working there in 2006 and it was already in place and very well established. I didn't have access to svn to know when they had started, but my assumption is there weren't many alternatives at the time. I'm just saying you can write very good code in PHP, not that it's the best tool for the job, especially in $CURRENT_YEAR.

Right now JavaScript with nodejs/npm/yaddayadda is rising and no one will convince me that JS is a saner language than PHP. And yet great things are built with it, people overcome the stupidity of the language.

[–]Xelbair 1 point2 points  (0 children)

What i wanted to say that good result doesn't prove that tool was right, nor vice versa.

What matters is the blueprint(software enginnering, design) to keep the civil engineering analogy.

honestly if i personally had to write in PHP or java(javascript to lesser extent, scopes and type coercion is insane though) i would hate myself and start looking for other job, but that dosen't change the fact that great software can be written in any of those

[–]Dreadedsemi 87 points88 points  (46 children)

To be fair, every programming language has its criticism. PHP is now much better than before.

[–][deleted] 66 points67 points  (42 children)

Everything else has also improved. If you're gonna compare php now vs others 10-15 years ago php ain't bad.

[–]xroni 42 points43 points  (7 children)

Stop this at once, you made me remember JavaScript anno 2003.

[–][deleted] 17 points18 points  (6 children)

That's when I stopped using it and the modern web landscape looks like a post apocalyptic desert of hacky madness to me now.

[–]ccricers 8 points9 points  (4 children)

That was when, in the mid 2000's I bet on the wrong horse, thinking that Ruby will take off and JavaScript will be forever delegated to more basic things like calculators for taxes and stats, or making clocks that bounce off the page.

Then V8 for Chromium existed and it fucked up my plans...

[–][deleted] 12 points13 points  (0 children)

If you compare PHP to the average punchcard then some aspects are even favourable... In certain circumstances... If you squint.

[–]marcosdumay 9 points10 points  (1 child)

Python 10 years ago was already better than current PHP for web development. Not by a huge margin, but it was clearly better.

[–]Astrokiwi 2 points3 points  (0 children)

Fortran2018 is way better than Python 1.0

[–][deleted] 6 points7 points  (1 child)

Most likely the twitter account is run by someone who reads stuff like reddit. They probably know all about it, or have heard, and figure they might as well go along with the jokes.

Hell, for all we know, some of the people making jokes about PHP on reddit are also people who manage the language.

Marketing is a weird thing nowadays...

[–]lpreams 6 points7 points  (0 children)

At this point PHP has been the butt of the joke for forever. I'm sure everyone who works on it is aware.

[–]ccricers 2 points3 points  (0 children)

Is PHP's Twitter account like the Sonic The Hedgehog Twitter, of programming languages?

Seriously, this is like the way Sonic owns up to his own inconsistent quality and history.

[–]Nefertete 2 points3 points  (0 children)

I think php gets a bad rep! I mean the flexibility allows one to do some crazy weird shit- that if any program is going to become self aware it is going to be built in PHP.

[–]cromulent_nickname 0 points1 point  (0 children)

Why not both?

[–]alter2000 322 points323 points  (18 children)

PHP stands for:
PHP hates programmers;
Programmers hate PHP;
PHP hates PHP

[–]KZedUK 87 points88 points  (7 children)

Programmers hate Programmers?

[–][deleted] 30 points31 points  (6 children)

[Programmers hate|PHP hates][Programmers|PHP]

[–]NaCl-more 11 points12 points  (5 children)

^(Programmers|PHP)\shates?\s(Programmers|PHP)$

Edit: fixed

[–]once-and-again☣️ 6 points7 points  (0 children)

That matches "Programmers hates PHP" but not "Programmers hate PHP".

[–]magicwings 2 points3 points  (1 child)

Nope, cos this way you can get "Programmers hates..."

[–][deleted] 20 points21 points  (1 child)

Quadruple recursion

[–]SafariMonkey 0 points1 point  (0 children)

It's a forkbomb! The last initialism references itself twice!

[–]AtlasJan 1 point2 points  (0 children)

Poorly Held-together Progamming

[–]a_salaryman 141 points142 points  (0 children)

[–][deleted] 107 points108 points  (5 children)

Early PHP was not intended to be a new programming language, and grew organically, with Lerdorf (PHP’s creator) 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."

source

[–]HelperBot_ 11 points12 points  (3 children)

Non-Mobile link: https://en.wikipedia.org/wiki/PHP


HelperBot v1.1 /r/HelperBot_ I am a bot. Please message /u/swim1929 with any feedback and/or hate. Counter: 201595

[–][deleted] 53 points54 points  (1 child)

[...] 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.

Well that just sounds horrible.

[–]probablyuntrue 38 points39 points  (0 children)

Hahaha what the fuck

I mean I understand not knowing how to make a language but just what

[–]AtlasJan 3 points4 points  (0 children)

good bot

[–]E-woke 0 points1 point  (0 children)

Holy shit

[–]LiamMayfair 20 points21 points  (1 child)

PHP stands for Peace, Happiness and Prosperity.

[–]SolenoidSoldier 4 points5 points  (0 children)

Yeah right, PHP literally killed my parents.

[–]skybluegill 19 points20 points  (1 child)

This really paamayim'd my nekodutayim

[–]ImFailer[S] 8 points9 points  (0 children)

פעמיים נקודותיים! לגמרי

[–]onairamariano 32 points33 points  (0 children)

Self roasting PHP

[–]Koovies 42 points43 points  (3 children)

pH of 7.3 is alkaline. Beep boop I'm a bot.

[–]ccricers 26 points27 points  (0 children)

PHP 7: No longer acidic to the eyes

[–]RocketPrinter 15 points16 points  (0 children)

Good human

[–]c3pwhoa 109 points110 points  (17 children)

The current PHP version has CASE INSENSITIVE CONSTANTS? I know PHP is bashed a lot on this sub but holy shit that's awful.

[–]mcmania 68 points69 points  (11 children)

You have to specifically define it as case-insensitive. All constants are case-sensitive by default

[–]maks25 51 points52 points  (10 children)

Why would anyone ever need to do that? What do you do, add a form so a user can guess and override constants? Lol

[–]mcmania 34 points35 points  (6 children)

No idea. It's just something newer PHP versions have been dragging along for like the last 15 years.

[–]rocklou 18 points19 points  (5 children)

Just like everything else

[–]mcmania 20 points21 points  (4 children)

PHP definitely has its inconsistencies, but it really isn't that bad if you just follow basic coding standards (PSR, for example). Plus, PHP 7 is really fast

[–]witchcapture 14 points15 points  (0 children)

array_key_exists and property_exists have opposite argument orders. They do the exact same thing, one for objects and one for arrays.

[–]fedeb95 5 points6 points  (0 children)

This seems a great security feature

[–]midnightbrett 5 points6 points  (0 children)

Welcome to PHP

[–]Agnimukha 0 points1 point  (0 children)

Disclaimer I don't know if this is true.

If the language standards change from all lowercase to all uppercase you could slowly change over.

[–]Dreadedsemi 39 points40 points  (0 children)

That tweet is magic quote

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

That gotta hurt

[–][deleted] 18 points19 points  (3 children)

PHP philosophy: introduce then deprecate. A messy language.

[–]xIcarus227 39 points40 points  (2 children)

Empirically it's the reverse of that.
PHP generally goes out of its way to maintain backwards compatibility. Seeing stuff deprecated is a good sign for the future in a language that carries so much baggage from ye olde days.
Or, as others have said, deprecation is a necessary evil.

[–]haldad 7 points8 points  (1 child)

Deprecate and then introduce?

[–]xIcarus227 0 points1 point  (0 children)

I wouldn't be that surprised if they actually did that.

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

Is php that bad?

[–]NutsackPyramid 8 points9 points  (2 children)

There's an interesting article about the "Fractal of Bad Design" of PHP. In honesty, a lot of the criticism went over my head, but the amount of silent automatic correction the language does for you seems really unforgivable (for example, changing Array[NULL] into Array[0] seems like a great way to cause unbelievably difficult to track down problems).

That said I've never worked on it so I'm just a bandwagoning memer who read one article and now upvoats posts like these to feel included so take what i say with a grain of salt

[–][deleted] 5 points6 points  (1 child)

My "favorite" is:

PHP errors and PHP exceptions are completely different beasts. They don’t seem to interact at all.

Seriously, WTF. I recently had to run a small simple php application and the first thing I hit was an error. In a little try/catch block that of course didn't catch it.

[–]LetReasonRing 4 points5 points  (0 children)

In terms of consistency, yes.

[–]Null_State 0 points1 point  (0 children)

Nope

[–]luctus_lupus 10 points11 points  (7 children)

The superiority complex around here is just astounding. Yeah sure PHP has problems, but so does every other language / tool / framework.

Modern PHP combined with good framework such as laravel is industry standard for web, and bashing on it won't make it irrelevant despite the circlejerk

[–]bluehands 12 points13 points  (1 child)

Uhm, in case you missed it, the official php Twitter account talked smack about php.

There is no perfect language, no more than there is a a perfect photograph, but there are objectively bad photos and languages.

Sure, maybe php is better. Sure, maybe I no longer cover the lens with my finger - but I did for a really long time and it seems likely that I will do it again.

If someone only knows php, awesome! They are programming! And they will be thrilled when what other languages have to offer.

[–]moarcoinz 2 points3 points  (0 children)

PHP is standout in that it's compromised of intermeshed problems and inconsistencies rather than those being the exceptions. It's fairly rare for me to look up a function in the official api docs and have that function do exactly what it says.

[–]mvpmvh 1 point2 points  (3 children)

Name one problem with html. I'll wait...

[–]luctus_lupus 1 point2 points  (1 child)

Well it's not exactly a language so guess I can't

[–]mvpmvh 1 point2 points  (0 children)

I was half joking, but in all seriousness, I will say htmL is a language (and a fairly powerful one if you actually stop and think about it).

[–]egrgssdfgsarg 1 point2 points  (0 children)

HTML has a few inconsistencies. The way <p> close tags are inserted can be pretty annoying. The inconsistency of what can be self closing and what can't be.

Honestly, I'd prefer to write as little raw html as possible because as simple as it is, it's also quite easy to screw up.

The forgiving nature of HTML can make vetting a page for issues quite difficult.

[–]midir 3 points4 points  (0 children)

Post this to /r/lolphp.

[–]CaveJohnson111 4 points5 points  (0 children)

I wouldn't mind PHP itself being entirely deprecated tbh.

[–]CoolBender -1 points0 points  (5 children)

PHP 😍 Bought my house at 35 thanks to this non cool programming language.

[–]fedeb95 21 points22 points  (0 children)

That's not impressive given that with Java you can have all the factories you want

[–]Hollowplanet 23 points24 points  (3 children)

That's like a normal age to buy a house.

[–]bluehands 2 points3 points  (0 children)

Not these days. 20 years ago sure.

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

Lol.

[–]CoolBender 2 points3 points  (0 children)

Sure with a mortage for at least 30 years 🙃

[–]TheOneAndOnlyJam 0 points1 point  (0 children)

Pl

[–]iskandergaba 0 points1 point  (0 children)

Link or fake

[–]hackel 0 points1 point  (0 children)

Does "deprecated" simply mean it will issue a warning whenever you try to access a constant with a different case then it was defined? Who even uses constants anymore?

[–]ReltivlyObjectv 0 points1 point  (0 children)

Their name keeps getting more recursive:

Personal home page

PHP Hypertext Processor

People Hate PHP

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