jeudi 13 février 2020

PHP conditional logic AND OR

small question. I have this code:

if($A || $B && $C)

This results in

if (($A) || ($B && $C))

Since AND has a higher precedence, i expected:

if (($A && $C) || ($B && $C))

Why is this not the case? Thanks

Aucun commentaire:

Enregistrer un commentaire