Isn't & bitwise and && logical? It is that way in C/++ as far as I know; but is it different in PHP? What about 'and'; is that another way of writing '&', '&&' or something else?
I would think that bitwise would be more likely to work as I'd like it to; since a bitwise AND is always dependant on a myriad of true / falses; thus, the value can never be determined from either operand alone... Saying that; one case : 00..0 bitAnd f() is always going to evaluate to 00..0, and that's a case I want to be fully evaluated..
I wouldn't like to risk unpredictability due to trying to one-line as much as I can; it's already a waste of process to AND on each iteration.
For now, I have gone with
if(!validate($i)){$ret=false;} but I suppose I could go with:
validate( $i ) or ( $ret = false );
Using a short-circuit to my advantage; I can see it more clearly there.
Thanks for reading and replying both. I distrust PHP for some valid reasons, this would have been an invalid one; but finding this nearly drove me to move the related project into another language for want of not crashing into more weirdness.
However; I can't really argue with C++'s interprettation of the same construct.