Assignment in PHP with bool expression: strange behaviour [duplicate]
问题 This question already has answers here : 'AND' vs '&&' as operator (10 answers) Closed 4 years ago . Why is $x true in this statment? $x = true and false; I've got the problem with some variables but I could reduce the problem to the primitive boolean values. Update: As you see in the replies the effect has to do with the operator precedense in PHP. There is also a good explanation about the problem in this question, which I couldn't find in the net before since I didn't know that I have a