You are here: Re: [PHP] empty function and array indices « PHP « IT news, forums, messages
Re: [PHP] empty function and array indices

Posted by Richard Lynch on 05/02/05 04:09

On Sun, May 1, 2005 1:47 pm, Gabriel Birke said:
> Is empty() some kind of special function where the validity
> of indices is not checked?

Bingo!

That's rather the whole point of empty and isset. :-)

The behaviour of empty has changed over time, with various releases.

isset seems more "stable" in that regard, so I prefer to use that one.

Also, to me, philosophically and from an application logic perspective, I
generally want to do something different when some variable is not set at
all, as opposed to having "" in it. But that's maybe just me. :-)

YMMV

--
Like Music?
http://l-i-e.com/artists.htm

 

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

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