Altough I could argue, that the addition is always called and therefore produces more cycles then a comparison :P
I agree.
Quote:
... how if/else and brackets are placed doesn't belong in this category tough.
I also agree with that - I didn't mean to advocate any specific style. I guess my feeling about Boofo's second example in the OP is that, while it's isn't incorrect, my preference is to use the trinary (.. ? .. : ..) operator in places where you are interested in the resulting value, and the use of it for the "side effects" makes it a little more difficult to read and probably doesn't improve the efficiency. (Which I guess is pretty much what Lynne already said).
Quote:
Originally Posted by Boofo
But which was would be the fastest and less intensive?
That I don't know anything about, for php at least.