You are here: Re: Re: Don't unset that variable you need globally « PHP Language « IT news, forums, messages
Re: Re: Don't unset that variable you need globally

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация