16

I'm don't understand what mean @ symbol before php function for example: @mysql_query(), if someone know please explain for me.

Wizard
  • 10,467
  • 37
  • 86
  • 159

3 Answers3

25

It's the error suppression operator, normally not a good idea to use it as you should be trapping errors cleanly rather than simply hiding them

Mark Baker
  • 205,174
  • 31
  • 336
  • 380
5

It will silent error messages. See http://php.net/manual/en/language.operators.errorcontrol.php

mbinette
  • 4,974
  • 3
  • 23
  • 31
3

It means that if an error is generated by that function, it is not shown. It suppresses the error so to say. As the PHP manual states:

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.

Look here for more information: http://php.net/manual/en/language.operators.errorcontrol.php

ranieuwe
  • 2,220
  • 1
  • 24
  • 30