---restore content starts---
if (Article = = useful) {Mad dot me;}
In PHP hold or other languages we often see the use of exclamation marks, a certain program language based friends know that the role of a single exclamation point is to take the opposite, that is, to take the negative side of the current results, such as:
<? PHP $a=true; Var_dump (! $a );? >
$a turns out to be true after a $ A is turned false, this usage is often seen in programs, but the use of double exclamation points may be much less. In fact, double exclamation point is equivalent to the ternary operation in the programming language ($a? $b: $c), such as
<? PHP $a=true; if (!! $a { echo ' OK ';} Else { echo ' error ';}? >
!! $a return a Boolean value (True or false), some friends may ask why this is used, directly in the normal way to do different? In fact, but as a programmer must be a broad understanding of the various writing procedures, not to be written by others can not understand the program. hehe, personal view!
PHP Technical –php exclamation mark!!! Usage of (ternary operation)