note 80031 added to function.unset
| From: | kreuzweg at gmail dot com | Date: | Tue, 25 Dec 2007 16:38:54 +0000 |
| Subject: | note 80031 added to function.unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-133994@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 212.63.193.10
Probable Submitter: 85.229.74.86
----
Manual Page -- http://www.php.net/manual/en/function.unset.php
Edit -- https://master.php.net/note/edit/80031
Del: integrated -- https://master.php.net/note/delete/80031/integrated
Del: useless -- https://master.php.net/note/delete/80031/useless
Del: bad code -- https://master.php.net/note/delete/80031/bad+code
Del: spam -- https://master.php.net/note/delete/80031/spam
Del: non-english -- https://master.php.net/note/delete/80031/non-english
Del: in docs -- https://master.php.net/note/delete/80031/in+docs
Del: other reasons-- https://master.php.net/note/delete/80031
Reject -- https://master.php.net/note/reject/80031
Search -- https://master.php.net/manage/user-notes.php