Here's a cool function if you have register_globals off in php.ini but really really need to enable it for one webapplication:
(This can be done for other global variables also like $_SERVER or $_REQUEST.)
Of course register_globals is off for a reason
but sometimes you've got an old script that's not written by you and you really really need it and don't have the time (or rather the client doesn't have the money) for you to go over all the code and change it into a completely safe thing.
In the thing I'm working on right now I'm able to figure out all the regular post and get variables but the cookies (used to prevent ballot stuffing) gave me headaches until I came across this function.