I love when I read through code as I’m hacking it up and I actually laugh out loud. This one got me today when I was hacking up Linfo (PHP Linux System information script).
// Extensions runExtensions($info, $settings); // Make sure we have an array of what not to show $info['contains'] = array_key_exists('contains', $info) ? (array) $info['contains'] : array(); // From the command prompt? Ncurses motha fucka! if (defined('LINFO_CLI')) { $out = new out_ncurses(); $out->work($info, $settings, $getter); } // Coming from a web server else { // Decide what web format to output in switch (array_key_exists('out', $_GET) ? $_GET['out'] : 'html') { // Just regular html case 'html': default: showInfoHTML($info, $settings); break;
Ah, makes the day seem not too bad when I see this stuff.
What was the question oh wise one ?