Quick question, what is the difference between the following two declarations:
define('I_LIKE_AT_SIGNS', false);
and
@define('I_LIKE_AT_SIGNS', true);
I.e. what does the @
-sign do?
Quick question, what is the difference between the following two declarations:
define('I_LIKE_AT_SIGNS', false);
and
@define('I_LIKE_AT_SIGNS', true);
I.e. what does the @
-sign do?
The @
symbol is PHP's only error control operator, and when prepended to any expression, all errors associated with that expression are suppressed.
In this case, any errors associated with your define
expression will be suppressed.
Use of the @
error suppression technique generally isn't encouraged or recommended. Instead, it's much better to use other error capture techniques so you can detect and handle the error.
It prevents error messages I believe.
"In PHP, it is used just before an expression to make the interpreter suppress errors that would be generated from that expression" -- From wikipedia
Use with Caution!!