You are here: Re: How to emulate isset() ? (is it possible?) « PHP Programming Language « IT news, forums, messages
Re: How to emulate isset() ? (is it possible?)

Posted by Giovanni R. on 05/29/07 22:43

gosha bine <stereofrog@gmail.com> wrote:

> I'm afraid that's not possible, Giovanni.

Never mind, it's not a big problem. :-)

> The usual workarounds are to use '@' operator to suppress notices
> wrapper(@$array['inexistent_index']);

Hey, when using the @ operator that index is NOT added to the array!
Good: it's almost the same result of isset(). :-)

I hadn't tried that code before because, as far as I *knew*, the @
operator only suppressed notices, while the real problem was that
byRef() was adding the index to the array, besides raising the notice.

I'm now asking myself if this is not a bug - an undocumented feature. :)

Thanks to all for your answer.

Giovanni

 

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

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