[PHP] Error Suppression with '@'

2005-08-02 Thread Justin Burger
Good Morning, I was having a discussion with a fellow PHP Developer this morning and he mentioned that he put's an '@' sign in front of all function calls, and every time he accesses an array; I know that this is sloppy, and dangerous, but I don't know exactly what this exposes him to, can any

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Torgny Bjers
Hello Justin, I would guess that this is mostly performance and memory related. When, for instance, trying to iterate an array, or a directory with files, using @ on all function calls, it will attempt to go through the array, attempting to allocate memory for each item, but when finding it

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Rory Browne
On 8/2/05, Justin Burger [EMAIL PROTECTED] wrote: Good Morning, I was having a discussion with a fellow PHP Developer this morning and he mentioned that he put's an '@' sign in front of all function calls, and every time he accesses an array; Any chance of revealing his identity - so that I

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Matt Darby
Justin Burger wrote: Good Morning, I was having a discussion with a fellow PHP Developer this morning and he mentioned that he put's an '@' sign in front of all function calls, and every time he accesses an array; I know that this is sloppy, and dangerous, but I don't know exactly what this

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread John Nichel
Justin Burger wrote: Good Morning, I was having a discussion with a fellow PHP Developer this morning and he mentioned that he put's an '@' sign in front of all function calls, and every time he accesses an array; I know that this is sloppy, and dangerous, but I don't know exactly what this

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread John Nichel
Justin Burger wrote: Does suppressing the error only suppress it from the screen, or does it ignore the error? ie: is the error still logged? Please reply to the list. I don't know if it still logs the error (assuming you have error logging turned on). -- John C. Nichel ÜberGeek

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Justin Burger
Does suppressing the error only suppress it from the screen, or does it ignore the error? ie: is the error still logged? On Aug 2, 2005, at 12:18 PM, John Nichel wrote: Justin Burger wrote: Good Morning, I was having a discussion with a fellow PHP Developer this morning and he

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Kristen G. Thorson
Example: I was working on a HORRIBLE piece of code for a cart app. The original programmer had a line like this: $result = mysql_query( SELECT * FROM user_logins WHERE cookie='.$cookie.' ); Where $cookie is a session id stored in a cookie (what else? ;). The problem was, he had some

Re[2]: [PHP] Error Suppression with '@'

2005-08-02 Thread Richard Davey
Hello Justin, Tuesday, August 2, 2005, 8:43:09 PM, you wrote: JB Does suppressing the error only suppress it from the screen, or JB does it ignore the error? JB ie: is the error still logged? It will ignore it totally, it doesn't even make it as far as the log files - which is why in most cases

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Jochem Maas
Justin Burger wrote: Good Morning, I was having a discussion with a fellow PHP Developer this morning and he mentioned that he put's an '@' sign in front of all function calls, and every time he accesses an array; I know that this is sloppy, and dangerous, but I don't know exactly what this

[PHP] Error suppression operator (@)

2005-05-04 Thread GamblerZG
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? -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Error suppression operator (@)

2005-05-04 Thread Greg Donald
On 5/3/05, GamblerZG [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

Re: [PHP] Error suppression operator (@)

2005-05-04 Thread Jochem Maas
Greg Donald wrote: On 5/3/05, GamblerZG [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

Re: [PHP] Error suppression operator (@)

2005-05-04 Thread Colin Ross
Pretty much the only time i use it is form processing... so i don't get a bunch of errors when someone doesn't fill out a (non-required) field.. Also i use it to prefill form data is i have a session running, ie. input name=fname type=text value?php echo @$_SESSION['APP']['fname']; ? / like