php-general | 2005051
Date: 05/04/05
- Next message: Jay Blanchard: "[PHP] [NEWBIE GUIDE] For the benefit of new posters"
- Previous message: Rory Browne: "Re: [PHP] to pass session from one websever to another webserver"
- In reply to: GamblerZG: "[PHP] Error suppression operator (@)"
- Next in thread: Jochem Maas: "Re: [PHP] Error suppression operator (@)"
- Reply: Jochem Maas: "Re: [PHP] Error suppression operator (@)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 5/3/05, GamblerZG <gambler <email protected>> wrote:
> I would like to know, whether using @ is a good practice.
I try not to use it much, but when I do I back it up with checking to
see if an error really occured. I use it for file handles, database
handles, stuff that I really expect to break sometimes. I don't ever
use it to assist with sloppy coding style, not defining variables and
such. In fact I always code with error_reporting( E_ALL ) until I
take the code into production.
> For example, I
> have an array of unknown length $array.
> Is it all right write something like this:
>
> <email protected>($first, $second) = $array;
I go with $array[0], $array[1] and such. Or maybe
while( list( $k, $v ) = each( $array ) )
{
}
-- Greg Donald Zend Certified Engineer http://destiney.com/-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Jay Blanchard: "[PHP] [NEWBIE GUIDE] For the benefit of new posters"
- Previous message: Rory Browne: "Re: [PHP] to pass session from one websever to another webserver"
- In reply to: GamblerZG: "[PHP] Error suppression operator (@)"
- Next in thread: Jochem Maas: "Re: [PHP] Error suppression operator (@)"
- Reply: Jochem Maas: "Re: [PHP] Error suppression operator (@)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

