aha! see, i didn't understand the whole picture. so, let me see if i can
create another question. suppose
if (($a_good = ($a == 'a')) && ($b_good = ($b == 'b'))) blahblahblah();
are you saying, that $b_good should always have the result of ($b == 'b')
even if $a != 'a'? that's not what my test shows (hi bogdan :)
so, is there something other than && that forces the other half to be
on 8/23/01 5:19 PM, TD - Sales International Holland B.V. at [EMAIL PROTECTED]
> On Wednesday 16 January 2002 16:18, you wrote:
> I think the cause is, which is lacking in the reply below, that if you have
> if ((function1(val, val)) && (function2(val, val)) blabla();
> you still want function2 to be executed because it does things necessary for
> your script, however, if one of them returns false you don't want blabla() to
> be executed. If that isn't the case you should use or or one of the other
> not too sure about that tho' but i'm sure I'll be corrected if that isn't the
> case :-)
>> on 1/16/02 5:57 AM, Miles Thompson at [EMAIL PROTECTED] wrote:
>>> For "or" statements it does, but not && or xor. I don't know about you,
>>> but I wouldn't want lazy evaluation on a conditional statement involving
>> i'm new to all this stuff, so i'll bite. hopefully someone can explain what
>> i'm missing.
>> if i have a statement like
>> if (($a == 'a') && ($b == 'b')) blahblahblah();
>> and, $a != 'a'.
>> why should php even look at the value for $b while evaluating this line?
>> shouldn't the if fail after evaluating $a?
>> -- mike cullerton michaelc at cullerton dot com
-- mike cullerton michaelc at cullerton dot com
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]