note 80031 rejected from function.unset by mazzanet
| From: | mazzanet@php.net | Date: | Wed, 26 Dec 2007 00:30:29 +0000 |
| Subject: | note 80031 rejected from function.unset by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134005@lists.php.net to get a copy of this message | ||
Note Submitter: kreuzweg at gmail dot com
----
I'm not sure if I'm going about this the wrong way, but it seems that using any reference
to the $GLOBALS array upsets the return statement in a function (this tested in PHP 4.3.1).
global $foo;
foo=1;
if($GLOBALS['foo']==1) {
return("This works");
}
if($GLOBALS['foo']==1) {
unset($foo)
return("This returns true, but doesn't return this text");
}
This also tried with $GLOBALS['foo']=="" or ==NULL.