Reply to Re: Error suppression operator (@)

Your name:

Reply:


Posted by Jason Barnett on 05/03/05 23:03

GamblerZG wrote:
> I would like to know, whether using @ is a good practice. For example, I
> have an array of unknown length $array.
> Is it all right write something like this:
>
> @list($first, $second) = $array;
>
> or is it better to do length check?

Using @ is good practice in any case where you simply *don't care*
whether you had an error or not. So if your scripts don't need a value
stored in $first or in $second, then you can use the @ operator. But
don't use @ in any case where you need to trap for errors (e.g.
validating input from $_GET / $_POST).

[Back to original 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

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