Possible Duplicate:
What is the use of @ symbol in php?
PHP functions and @functions
What does the “@” symbol do in SQL?
Often when looking through online resources / questions including code on this website, I often come across the '@' operator.
In the PHP code I see, the @ operator generally comes before a method such as @fread()
. However, by the looks of the code, it wouldn't have actually made a difference whether or not fread()
was called with or without the '@' in front of the method.
In the MySQL code, the @ operator generally comes before a column/field name. I believe that the @ is used to access a default variable instantiated at some point manually by the user, alike to an env
variable in PHP.
Please can you tell me if my assumptions are correct, and if not, when and why the '@' sign or operator should in fact be used?
Thanks,
Max.