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
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
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
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
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
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
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
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
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
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
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,
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
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
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
14 matches
Mail list logo