Could someone explain me what is &&

(Czihong) #1

Hi, I know && is Logical Operators in programming language.

But when I go through the The [color="#4169E1"]Definite Guide to Yii [/color], here is a example at documents.

In the actionBatchUpdate() method, there is a statement says: [color="#4169E1"]$valid=$valid && $item->validate();


Could anyone tell me what does && means in this case?

(tri - Tommy Riboe) #2

I the first operand evaluates to false, no need to evaluate the second operand.


(Czihong) #3

thanks a lot tommy. make sence now