I found this few minutes ago:
isset($txt['calendar_month']) ? $txt['calendar_month'] : $txt['calendar_month']
Nice one !
Well it's not code, but a comment in the code. At work I found this a few days ago.
That comment along with it's commented out line of code had been in the code for almost 5 years. lol
AHAHAH!!
http://sourceforge.net/projects/yabbse/
It's really funny if you check the code, once a modern forum but ten years later ..
Soooo many docs, it's eman-friendly ;)
This
$Cookie_Length = 525600; // about 1 year
and this
// Write log
is the full documentation in LogInOut.php
That's because you can't write wrong code in Perl!!! 8)
That was fun to go though some of that old code, sparse on the comments, but it made up for it with the awesome collection of globals, a sample from post2
global $name, $email, $username, $subject, $message, $icon, $ns, $threadid, $txt, $notify, $MaxMessLen, $db_prefix;
global $settings, $board, $mreplies, $maxmessagedisplay, $enable_guestposting, $waction, $ID_MEMBER, $ubbcjspath;
global $REMOTE_ADDR, $cgi, $yySetLocation, $color, $sourcedir, $realname, $lock, $settings, $moderators, $doLimitOne;
global $attachment, $attachment_size, $attachment_name, $HTTP_POST_FILES, $modSettings, $isAnnouncement;
global $linkcalendar, $month, $day, $year, $evtitle, $span, $timeoffset;
Not much for funny code, but I have a large collection of real comments found within code. Some of my PG13 favorites are:
A bit different, but terribly funny!
I asked Spuds (since he is the expert :P) to enable some more scrutinizer checks on the development branch (the "master" branch doesn't have many in order to avoid the "background noise"...if we can call it that way LOL), and then I did a run on a branch I'm working on:
https://scrutinizer-ci.com/g/emanuele45/Dialogo/inspections/941c1d54-b0f4-4fca-8c41-e68e9a8c633a
reading through the output I found this:
I don't even know how to pronounce that number!! ROFL!
/me wonders what would happen pushing SMF... O:-)
ETA: forgot to say, the number refers to the function loadProfileFields in Profile.subs.php.
ETA2: okay, never mind, the previous one was a joke:
Guess where this comes from?
YES! Our beloved parse_bbc! :D
Damn, we have only gone through 1,555,093,860,041,716,266,473,879,976,683,304,236,537,327,034,154,287,129 of those paths so far, I can't believe we still have 3 septendecillion to check ... we will never be done :'(
// Default to 10.
if (empty($_REQUEST['viewscount']) || !is_numeric($_REQUEST['viewscount']))
$_REQUEST['viewscount'] = 10;
Present in the code since the 1st SVN import... and does nothing at all?