RE: Re: UNLESS Statement Equivalent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Arno Kuhl [mailto:arno@xxxxxxxxxxxxxx]
> Sent: 12 March 2013 13:04
> 
> Mike, I presume you're saying the precedence of the Boolean keyword
> operators is lower than the Boolean symbol operators, but if so then
> wouldn't there be less need for the parentheses? I prefer using the
> Boolean
> keyword operators for both the readability and because of the lower
> precedence. Unless I've been wrong all this while and the keyword
> precedence
> is actually higher?

You are absolutely right, of course -- I failed to engage brain before
typing words! Both sets of Boolean operators have lower priority than
the comparison operators, so none of the parentheses are needed in
either of those cases -- it's the assigning operators (and ?:) that
come between the symbolic and keyword Booleans, so that

   $a = $b = true&&$c

means something different from

   $a = $b=true and $c

Thanks for picking me up on that one!

Cheers!

Mike

-- 
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,  
Portland PD507, City Campus, Leeds Metropolitan University,
Portland Way, LEEDS,  LS1 3HE,  United Kingdom 
E: m.ford@xxxxxxxxxxxxxx     T: +44 113 812 4730





To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux