| Posted by steve on 07/06/05 05:35 
"" wrote:> In comp.lang.php steve <UseLinkToEmail@dbforumz.com> wrote:
 > > ok, so what is the difference between:
 > >
 > > unset($var)
 > > and
 > > $var = null;
 > >
 > > I know the first form removes the $var from name space, but
 > is there
 > > any functions to check the difference.  isset() responds the
 > same way
 > > to both.
 >
 > http://php.net/isset says it all:
 >
 > "isset() will return FALSE if testing a variable that has been
 > set to
 > NULL."
 >
 > I have no idea why (and who decided that) a variable set to
 > null is
 > considered unset (and a reference to a variable with value
 > null not
 > raising a "Undefined variable" notice). IMHO it simply should
 > return
 > true since it is just plain inconsistent.
 
 I am looking for something like defined(CONSTANT) but I guess not..
 
 --
 Posted using the http://www.dbforumz.com interface, at author's request
 Articles individually checked for conformance to usenet standards
 Topic URL: http://www.dbforumz.com/PHP-Don-unset-variable-globally-ftopict237516.html
 Visit Topic URL to contact author (reg. req'd).  Report abuse: http://www.dbforumz.com/eform.php?p=826852
  Navigation: [Reply to this message] |