Posted: Fri Jan 12, 2007 5:07 pm
When you do:I believe you are unsetting a reference to the global var ... which is really decrementing the reference count. Whereas I believe $GLOBALS['x'] is the actual var. It is a feature of PHP variables.
Just add these to the reasons that it is not good practice to use global vars. Not much you can do because you are dealing with an existing, poorly coded, application.
Code: Select all
global $x;
unset($x);Just add these to the reasons that it is not good practice to use global vars. Not much you can do because you are dealing with an existing, poorly coded, application.