- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
My first thought was that it was just an oddly named identity function. It didn't really hit me until I'd had my coffee.
I'm really regretting that coffee now.
Admin
I doubt this has anything to do with the subject, but in Czech, DrD pretty much universally refers to "Dračí Doupě", a 90s massively popular D&D-clone (by which i mean it was pretty much the only RPG anyone played here until ~2005, when everyone switched to "Dračí Doupě 2" for about five minutes before realising the game was absolute rubbish and moving on to other RPGs). Why it needs to be put in $arr, I'm not quite sure, though.
Admin
I would drd working on this.
Admin
To me
drd
sounds like "data read" which means nothing at all.Admin
Clearly a pirated copy of the code....
ARRRRRRRRRRRRRRR!
Admin
Wouldn't surprise me if this developer, having made a huge applic with hundreds of globals, was told that global variables were bad (and perhaps heard about and wildly misunderstood some basic OO principles) and thought "I know, I'll avoid that and write a getter function for it"...
Admin
"applic" should of course be "application", it seems I forgot to actually choose the autocomplete when it came up!
Admin
My guess is that the method used to do something useful, and then someone decided to stop using this drd thing and just use the global array all the time. But since the method was already everywhere, the easiest thing to do was just turn it into a wrapper. Or maybe I'm just being too charitable...
Admin
DrD of course means "Doesn't Read Directions."
Admin
These are not the drd's you're looking for.
Admin
It was supposed to be Dord...
https://en.m.wikipedia.org/wiki/Dord#:~:text=The%20word%20dord%20is%20a,by%20the%20staff%20of%20G.&text=Patterson%2C%20the%20dictionary's%20chemistry%20editor,letter%20%22D%22%20can%20abbreviate.
Admin
Obviously the programmer was a fan of Dr Demento.
Admin
If you have an empty function that's called in loads of places, then you can be sure it once did something and when it wasn't needed any more it was simpler to strip out the code than replace all the calls to it.
Admin
In the dark times I used drd as the prefix to dropdown controls. Though it seems it would be a bit backwards to convert dropdown values to an array.
Admin
I suppose that's what happened when one wrote programs during the Great Vowel Shortage; rations of vowels had to be kept for mandatory uses like keywords, so there were very few left for identifiers.
Admin
From the list at https://en.wikipedia.org/wiki/DRD , I favour:
"Dividends received deduction"
On the other hand the Oxford Dictionary of Abbreviations at https://www.oxfordreference.com/view/10.1093/acref/9780199698295.001.0001/acref-9780199698295-e-30731 suggests:
"direction radar data take-off"
Admin
Drd, where's my car?
Admin
Sounds more like this is one of those decompiled PHP scripts that lost all symbols.
I've seen this a few times, where they either lost source code or ripped off a third party contractor and decompiled the 'protected' binaries produced by one of those 'copy protection' schemes.
Admin
This function might actually do something. In PHP, arrays (which are also key/value pairs) are passed by value. So if they are planning on making changes to the return value, this isolates it.
Objects are passed by reference though, and it’s possible that $arr doesn't contain an array given what we know about their naming conventions.
Admin
I've heard of obfuscated php script files. I have never heard of a compiled php script though.
Admin
My guess is that the getter function served as the place to put a breakpoint. Programs with global variables require a lot of debugging of the data access...
Admin
dirty rotten data