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?
What is a Definition. The Oxford dictionary defines definition as “an exact statement or description of the nature, scope, or meaning of something” and the Merriam-Webster defines it as “a statement expressing the essential nature of something”. A definition is usually the meaning given in a dictionary.
Definition of define transitive verb. 1a : to determine or identify the essential qualities or meaning of whatever defines us as human. b : to discover and set forth the meaning of (something, such as a word) how the dictionary defines "grotesque"
6. The definition of define is to describe the meaning or character of something. An example of define is when you tell someone what a word means. An example of define is when you set clear rules for living in your house. verb.
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!!
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