Possible Duplicates:
Reference - What does this symbol mean in PHP?
What does @ mean in PHP?
I have a line in my code which looks like this:
@mysql_select_db($dbname) or die( "Error: Unable to select database");
It works, but I want to know what the @ does and why it is there.
The @
symbol suppresses any errors and notices for the expression it precedes.
See this reference: PHP Error Control Operators
PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With