sometime I see pepole use @ with variables
ex:
@$cat=$_GET;

is this something like pass by reference?

can you direct me to a good tutorial in this matter

Thank you

How does it help?

Thanks.

@ doesn't help it error handling, but it supresses the errors.

if(@mysql_num_rows($result) > 0){ //do something

This above code, supresses the warning if there is something wrong with the query. Its not a good practice to have @, because it makes your life very difficult to know where the exact error is.

. Its not a good practice to have @, because it makes your life very difficult to know where the exact error is.

I agree. I have absolutely never used it.... another lazy practice even worse than short tags.

Good code has error handling, not error suppression.


Matti Ressler
Suomedia