[UPHPU] testing multiple items in an if

Brady Mitchell mydarb at gmail.com
Sat Jan 19 22:57:01 MST 2008


On Jan 19, 2008, at 738PM, Wade Preston Shearer wrote:

> Is…
> 	if($var != 'a' || 'b')
> valid syntax?

Yes.

> If yes, is it the same as…
> 	if($var != 'a' && $var != 'b')

No. It is the same as

if($var != 'a' || 'b' == true)

Brady


More information about the UPHPU mailing list