|
Posted by robert on 05/26/06 05:34
"MW" <newsgroups@tesseract.info> wrote in message
news:begc721rleclub698kd3c4hfnhhhk80jfh@4ax.com...
| On 25 May 2006 16:26:01 -0700, "dimo414" <dimo414@gmail.com> wrote:
|
| >you can unset a variable by making it an argument for the 'unset()'
| >function. However I don't know if that will work for functions.
| >
| >You shouldn't need to unset the function though. I haven't looked at
| >your fuction (obviously) but I would guess you have a logic error in
| >your arguments or global variables.
|
|
| Is there any way to just unset all globals, or do I have to unset each
| one at a time?
|
unset($_GLOBALS);
perhaps?
on a personal note...it is VERY poor form to use globals ESPECIALLY in
functions. you should think about either passing variables as args to the
function, or create a class where you can set properties - the class
consumes those by the $this->_variableNameHere methodology. that makes
tracking down bugs MUCH easier, makes testing easier, makes the application
more scalable and reliable. but that's just my $0.02 usd.
Navigation:
[Reply to this message]
|