On Wed, May 16, 2007 9:08 am, Brian Moon wrote:
> According to my memory of Please My Dear Aunt Sally these should be:

My memory has "My Dear" in equal priority, left to right...

This documentation would seem to bear that out:
http://us.php.net/manual/en/language.operators.php#language.operators.precedence

> -1/2*5 = -.1
> 1/-2*5 = -.1
> 1/2*-5 = -.1

Those are most definately all wrong. :-)

> So, that is bad if PHP answers that way.  Someone please correct me if
> my memory is wrong.  Is there some rule that negative values should be
> done first before positive values?

Yes.

The unary "-" operator buried in the third line that table is "that
rule."

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to