samedi 21 novembre 2015

How does work if / else?

I have $first and $second. They can have value 0 or 1.

if ( $first AND $second ) {
   // True
} else {
   // False
}

My mind (and Google search) tells me, that the result is true only when $first == 1 and $second == 0 or vice versa. But the result is true when both of this variables are 1.

I don't understand how does it works.

Aucun commentaire:

Enregistrer un commentaire