$_SERVER, pretty formatting

I laughed my ass off when I was reading through the user comments/notes of the $_SERVER manual today. It’s content from back in October, but who needs to visit the $_SERVER manual on a weekly or even monthly basis?

Several people in the past have come up with [>]clever loops to display the contents of the $_SERVER array. I can’t say they had bad ideas, because, just maybe their idea had use in customized debugging for a product they are marketing? (Probably not…) It’s slowly progressed into a pissing match of who can do it better, less lines of code, more efficient, etc. Lord Mac showed them all what’s  with his comment up…

An even *more* improved version...

<?php
phpinfo
(32);
?>

This grabs the $_SERVER array and formats according to the phpinfo(); styling guide. So much easier to type out/call than writing your own customized function… but maybe not easier to remember. :)

No related posts.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*