2

What is the meaning of @#variable in php ?

$fix=@#parts;
n8coder
  • 691
  • 4
  • 12

3 Answers3

6

@ is used to suppress any errors that may occur on this line of the code

http://php.net/manual/en/language.operators.errorcontrol.php

When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored.

I would not recommend using it at all because this may result in failure of noticing some important error/warning and make debugging a havoc. On a production environment use error_reporting setting that will prevent any errors or warning from showing up while on a development server I would recommend to turn on any error reporting

Vladimir Hraban
  • 3,543
  • 4
  • 26
  • 46
5

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.

Link : PHP.net explanation

Morsok
  • 126
  • 1
  • 3
1

The @operator turns off error handling.

Rápli András
  • 3,869
  • 1
  • 35
  • 55