Re: [PHP] A serious bug? "or" operator gives out diffferent results depending on order of operands

2004-12-27 Thread Jose M.Herrera
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rory Browne wrote: | I think what Jose is trying to say, is that because 'or' has a lower | precidence than =, you are interpreting the expression wrong. Yes, I was trying to say that. The () are very important when you need to use OR, AND, ||, &&, etc.

Re: [PHP] A serious bug? "or" operator gives out diffferent results depending on order of operands

2004-12-24 Thread Jose M.Herrera
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bogdan Ribic wrote: | Here's a little test script: | | | $x = 2; | $y = 10; | | $b1 = is_null($x) or ($y > 5); | $b2 = ($y > 5) or is_null($x); Yes, of course. Your code or example, is just like: ( $b1 = is_null($x) ) or ( $y > 5