Making code work with register_globals turned off | I have inherited some legacy PHP code what was written back when it was standard practice to use [`register_globals`](http://php.net/register_globals) (As of PHP 4.2.0, this directive defaults to off, released 22. Apr 2002).


We know now that it is bad for security to have it enabled. The problem is how do I find all the places in the code where I need to use `$_GET` or `$_POST`? My only thought was to set the error reporting to warn about uninitialized variables and then test each part of the site. Is there an easier way? Will I have to test each code path in the site or will PHP give a warning on a file basis?