The difference between define (...) and @define (...)

Quick question, what is the difference between the following two ads:

define('I_LIKE_AT_SIGNS', false);

and

@define('I_LIKE_AT_SIGNS', true);

those. what does @-sign do?

+5
source share
2 answers

@symbol is just a PHP error management statement, and when it is added to any expression, all errors associated with that expression are suppressed.

In this case, any errors related to your expression definewill be suppressed.

Using the error suppression method is @usually not recommended or not recommended. Instead, it is much better to use other error capture methods so that you can detect and handle the error.

+11
source

, .

" PHP , , " - From wikipedia

!

+7

All Articles